rwlocks, correctness over speed.

Alfred Perlstein alfred at freebsd.org
Fri Nov 23 08:45:52 PST 2007


* Stephan Uphoff <ups at freebsd.org> [071123 07:57] wrote:
> Alfred Perlstein wrote:
> >
> >That's an interesting hack, I guess it could be done.
> >
> >I would still like to disallow recursion.
> >  
> Oh - I am all for disallowing recursion.
> In my opinion the only valid place for a thread to acquire the same lock 
> multiple times is inside a transaction system with full deadlock detection.
> The question is if we can do that this late in the game?
> Maybe we could make non recursive the default and add a call 
> rw_allow_recurse  or rw_init_recurse  to allow recursion on a lock if we 
> can't get away with
> the straight out removal of the option? (Or less desirable - keep the 
> current default and add functions to disallow recursion)
> >Can we come to a concensus on that?
> >
> >  
> 
> +1 for disallowing recursion
> 
> Stephan

The plan is to simply mention in the documentation that it's not
allowed, we'll also remove any options associated with read
recursion (if there are any).

INVARIANTS to catch such things, and subsystems that still use it
will be allowed to live for a while until they are fixed.

-- 
- Alfred Perlstein


More information about the freebsd-arch mailing list