Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Oct 2000 12:40:28 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        (FreeBSD SMP list) <FreeBSD-smp@FreeBSD.org>, (Jason Evans) <jasone@FreeBSD.org>, (Greg Lehey) <grog@lemis.com>
Subject:   Re: New mutexes (was: cvs commit: src/sys/conf param.c src/sys/k
Message-ID:  <XFMail.001013124028.jhb@FreeBSD.org>
In-Reply-To: <200010130244.TAA03795@usr05.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <jhb@FreeBSD.org> -- 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.001013124028.jhb>