Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jan 2009 00:36:44 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        arch@freebsd.org
Subject:   Re: need for another mutex type/flag?
Message-ID:  <497C249C.5060507@elischer.org>
In-Reply-To: <23211.1232871523@critter.freebsd.dk>
References:  <23211.1232871523@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote:
> In message <497BA91D.805@elischer.org>, Julian Elischer writes:
> 
>> I would like to be able to add a flag to a mutex
>> that tags it as a 'leaf' mutex. As a result it would be illegal
>> to take any other mutex while holding a leaf mutex.
> 
> I second that, even if the flag is purely documentary, it is a
> good idea.
> 

Even purely documentary would be good but given the option, I'd
like it to scream when Witness is enabled and you try get
another mutex....

there are certain contexts (e.g. in most netgraph nodes)
where we really want the authors to only take such locks
and taking more unpredictable mutexes plays havoc with
netgraph response times as a system as a whole, since if
one node blocks, teh thread doesn't get to go off and service other nodes.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?497C249C.5060507>