Date: Mon, 7 Aug 2000 13:02:37 -0700 (PDT) From: Matt Dillon <dillon@earth.backplane.com> To: David Greenman <dg@root.com> Cc: Poul-Henning Kamp <phk@critter.freebsd.dk>, Alfred Perlstein <bright@wintelcom.net>, Mike Smith <msmith@FreeBSD.ORG>, Stephen McKay <mckay@thehub.com.au>, freebsd-current@FreeBSD.ORG, dillon@FreeBSD.ORG Subject: Re: Ugly, slow shutdown Message-ID: <200008072002.NAA38592@earth.backplane.com> References: <200008071903.MAA03649@implode.root.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Just a quick perusal of the kernel code shows a number of possible unexpected side effects from unexpected wakeups. I see several places where a 'WANTED' flag is set in a loop waiting for something and assumed to be cleared after the tsleep() returns. Some of these side effects are quite persistent. For example, if PG_WANTED is set in a page the VM system will activate the page rather then deactivate it. An unexpected wakeup in the VM system could lead to a page with PG_WANTED *LEFT* *SET* on the page! It might not be fatal, but it sure isn't the type of operation we want! There are a couple of places in the NFS code where a sleep wakeup results in a retry. There is a place where LC_EXPIREDWANTED is checked and causes a whole sequence of conditionals to be skipped. This is after 5 minutes of searching. I'm not going to spend N hours trying to find every case. Just finding two in 5 minutes is enough proof for me that it's just too dangerous to go and change expected tsleep/wakeup semantics without going through and auditing and documenting every piece of code that uses tsleep/wakeup. -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?200008072002.NAA38592>