From owner-freebsd-current Mon Aug 7 15:33:39 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 7C12D37BBAD; Mon, 7 Aug 2000 15:33:34 -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 PAA04340; Mon, 7 Aug 2000 15:14:57 -0700 (PDT) Message-Id: <200008072214.PAA04340@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 23:21:48 BST." <398F367C.27DD39DA@originative.co.uk> From: David Greenman Reply-To: dg@root.com Date: Mon, 07 Aug 2000 15:14:56 -0700 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >I did say "as a general rule". If you know that "by design" nothing else >is going to mess with what you're sleeping on before you wake up then >you can make tighter optimisations but that's not the general case. >There is such a thing as over optimisation though and for the sake of a >simple if statement it is probably better to write code that is robust >to changes made elsewhere in the system rather than squeeze every inch >of performance out of the code, unless there's a real need to optimize >in that particular area. In some cases it isn't practical or very expensive to verify that the condition that caused the sleep in the first place has been satisfied - that's often why certain parts of the kernel rely on the established tsleep symantics. -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