lkml.org 
[lkml]   [2009]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC tip/core/rcu 18/18] rcu: add primitives to check for RCU read-side critical sections
On Wed, Dec 16, 2009 at 11:31:34AM +0100, Peter Zijlstra wrote:
> On Tue, 2009-12-15 at 15:02 -0800, Paul E. McKenney wrote:
> >
> > Also create rcu_dereference_check(), which takes a second boolean argument
> > into which one puts rcu_read_lock_held() or similar. For example:
> >
> > rcu_dereference_check(gp, rcu_read_lock_held() ||
> > lockdep_is_held(my_lock));
>
> Ah, so you're going to tackle this the other way around, interesting :-)

Still feeling my way around this one, but for the moment, yes. ;-)

One potential issue is that for lockdep, avoiding false positives means
erring on the side of the lock -not- being held, while for this approach
to rcu_dereference() checking, avoiding false positives means erring on
the side of the lock being held.

I might need to create a CONFIG_PROVE_LOCKING_RCU to allow shutting off
the more-detailed RCU checking when people want to do partial deadlock
checking, but will see how it goes.

Thanx, Paul


\
 
 \ /
  Last update: 2009-12-16 16:21    [W:1.483 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site