need for another mutex type/flag?

Julian Elischer julian at elischer.org
Sun Jan 25 00:50:32 PST 2009


Poul-Henning Kamp wrote:
> In message <497BA91D.805 at 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.



More information about the freebsd-arch mailing list