Date: Fri, 24 Mar 2000 09:59:16 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Alfred Perlstein <bright@wintelcom.net> Cc: freebsd-current@FreeBSD.ORG Subject: Preliminary SMP/BGL patch Message-ID: <200003241759.JAA14699@apollo.backplane.com>
next in thread | raw e-mail | index | archive | help
A preliminary BGL patch is now on my site, relative to RELENG_4. http://www.backplane.com/FreeBSD4/ It is the smp-patch-03.diff item at the end of the first section. My test box successfully built the world. I know I'm probably missing something, but so far I can't tell what it might be because nothing is failing :-) This is considered very alpha and has been made available mainly to endgender discussion. You know, things like "Matt, you've really gone off the deep end this time! You cannot *DO* that to the syscall interface!". My primary assumption is that read access to fields in curproc plus any structural references that are 'static'-like (e.g. like ucred) are legal without having to hold the BGL. So getuid() can be made BGL safe but getppid() cannot (nor can getpid() because compatibility mode also returns the ppid). Obviously there are other fine-grained solutions. The biggest assumption in the patch is that doreti does not have to be called for system calls. Being able to get rid of it for syscalls means being able to do an end-run around doreti's extremely SMP-unsafe code. I can categorize the system calls as follows: * SMP safe trivially (getuid()) * SMP safe trivially through fine-grained structural locks (e.g. getppid()). The case where the code has no potential to block beyond obtaining a single fine-grained lock. * SMP safe through the use of nested locks (e.g. VM, buffer cache). Less trivial because we have to utilize the spl*() mechanisms to prevent interrupts from interfering and deadlocking us. * SMP safe but with potential nested blocking conditions -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003241759.JAA14699>