From owner-freebsd-smp Fri Oct 13 12:41:13 2000 Delivered-To: freebsd-smp@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id BD9D037B66F; Fri, 13 Oct 2000 12:41:10 -0700 (PDT) Received: from laptop.baldwin.cx (ether.osd.bsdi.com [204.216.28.196]) by pike.osd.bsdi.com (8.11.0/8.9.3) with ESMTP id e9DJe9520192; Fri, 13 Oct 2000 12:40:56 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200010130244.TAA03795@usr05.primenet.com> Date: Fri, 13 Oct 2000 12:40:28 -0700 (PDT) From: John Baldwin To: Terry Lambert Subject: Re: New mutexes (was: cvs commit: src/sys/conf param.c src/sys/k Cc: (FreeBSD SMP list) Cc: (FreeBSD SMP list) , (Jason Evans) , (Greg Lehey) Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 13-Oct-00 Terry Lambert wrote: >> I'm just doing the slides for the Con, and going through the sources I >> note that we have sprouted a plethora of mutexes over the last month. >> How are we keeping track of them? How does somebody who wants to add >> a new mutex know where the mines are? > > The mines are anywhere more than 1 mutex is held, anywhere that > a mutex is held with a recursion count greater than 0, and > anywhere code that can sleep holds a mutex. We are working on a list of rules atm, the current list can be found on the SMP website (http://www.FreeBSD.org/~jasone/smp/). > --- > > As to tracking them: use a mutex. 8-). > > Acquire the mutex that allows you to add a mutex > Add the new mutex > Release the mutex adding mutex (Requires you to document your addition) We already do this. Please, at least look at the code we are using. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message