From owner-freebsd-current Mon Aug 7 15: 7:35 2000 Delivered-To: freebsd-current@freebsd.org Received: from implode.root.com (root.com [209.102.106.178]) by hub.freebsd.org (Postfix) with ESMTP id BA5F837B90F; Mon, 7 Aug 2000 15:07:29 -0700 (PDT) (envelope-from dg@implode.root.com) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.8/8.8.5) with ESMTP id OAA04253; Mon, 7 Aug 2000 14:49:34 -0700 (PDT) Message-Id: <200008072149.OAA04253@implode.root.com> To: Paul Richards Cc: Poul-Henning Kamp , Alfred Perlstein , Matt Dillon , Mike Smith , Stephen McKay , freebsd-current@FreeBSD.ORG, dillon@FreeBSD.ORG Subject: Re: Ugly, slow shutdown In-reply-to: Your message of "Mon, 07 Aug 2000 22:56:25 BST." <398F3089.416DEA1@originative.co.uk> From: David Greenman Reply-To: dg@root.com Date: Mon, 07 Aug 2000 14:49:34 -0700 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >In the particular case of sleeping though, a woken process does need to >check the condition that it slept on because one of the other processes >sleeping on that resource may have had a chance to run first and changed >some state. So as a general rule, you shouldn't assume that everything >is fine when you return from being asleep because it might not be. No, that's not true, and there are many examples in the kernel where a bogus wakeup would lead to bad things happening. I recall some code in the advisory locking code, and VM system, that assume that there is only one wakeup event and that the thing causing it assures that certain other things have occured before issuing it. That's just the way it has worked since the dawn of time. -DG David Greenman Co-founder, The FreeBSD Project - http://www.freebsd.org Manufacturer of high-performance Internet servers - http://www.terasolutions.com Pave the road of life with opportunities. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message