From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 5 22:31:24 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6869616A41F; Fri, 5 Aug 2005 22:31:24 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0CBF843D55; Fri, 5 Aug 2005 22:31:23 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j75MTU4Y058626; Fri, 5 Aug 2005 16:29:30 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 05 Aug 2005 16:30:32 -0600 (MDT) Message-Id: <20050805.163032.133432410.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" In-Reply-To: <200508051329.14767.jhb@FreeBSD.org> References: <200508041415.56140.jhb@FreeBSD.org> <200508042253.34165.hselasky@c2i.net> <200508051329.14767.jhb@FreeBSD.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Fri, 05 Aug 2005 16:29:35 -0600 (MDT) Cc: freebsd-hackers@freebsd.org, hselasky@c2i.net Subject: Re: How to do proper locking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2005 22:31:24 -0000 In message: <200508051329.14767.jhb@FreeBSD.org> John Baldwin writes: : Maybe, but another thing you need to consider is "maintainenance" overhead. : Device drivers, especially, should be the simplest parts of the kernel to : implement because we want to minimize the potential for screw up in that : area. Having to trust that the same code is going to be duplicated 40 or 50 : times without any errors versus having it done once in a centralized place : where it breaks everyone if it is broken is just insane. Otherwise, we might : as well go write the whole kernel in assembly so we can tweak every last bit : out of it. :) History has shown that when you have to rely on 50 copies of something being done right, 48 of them will, in fact, have 49 different things wrong with them. Warner