Re: [RFC tip/locking/lockdep v6 19/20] rcu: Equip sleepable RCU with lockdep dependency graph checks

2018-04-13 Thread Boqun Feng
On Thu, Apr 12, 2018 at 11:12:17AM +0200, Peter Zijlstra wrote: > On Thu, Apr 12, 2018 at 10:12:33AM +0800, Boqun Feng wrote: > > A trivial fix/hack would be adding local_irq_disable() and > > local_irq_enable() around srcu_lock_sync() like: > > > > static inline void srcu_lock_sync(struct loc

Re: [RFC tip/locking/lockdep v6 19/20] rcu: Equip sleepable RCU with lockdep dependency graph checks

2018-04-12 Thread Peter Zijlstra
On Thu, Apr 12, 2018 at 10:12:33AM +0800, Boqun Feng wrote: > A trivial fix/hack would be adding local_irq_disable() and > local_irq_enable() around srcu_lock_sync() like: > > static inline void srcu_lock_sync(struct lockdep_map *map) > { > local_irq_disable(); >

Re: [RFC tip/locking/lockdep v6 19/20] rcu: Equip sleepable RCU with lockdep dependency graph checks

2018-04-11 Thread Boqun Feng
On Wed, Apr 11, 2018 at 11:57:30AM -0700, Paul E. McKenney wrote: > On Wed, Apr 11, 2018 at 09:56:44PM +0800, Boqun Feng wrote: > > Although all flavors of RCU are annotated correctly with lockdep > > annotations as recursive read locks, the 'check' parameter for their > > calls to lock_acquire() i

Re: [RFC tip/locking/lockdep v6 19/20] rcu: Equip sleepable RCU with lockdep dependency graph checks

2018-04-11 Thread Paul E. McKenney
On Wed, Apr 11, 2018 at 09:56:44PM +0800, Boqun Feng wrote: > Although all flavors of RCU are annotated correctly with lockdep > annotations as recursive read locks, the 'check' parameter for their > calls to lock_acquire() is unset. Which means RCU read locks are not > added into the lockdep depen

[RFC tip/locking/lockdep v6 19/20] rcu: Equip sleepable RCU with lockdep dependency graph checks

2018-04-11 Thread Boqun Feng
Although all flavors of RCU are annotated correctly with lockdep annotations as recursive read locks, the 'check' parameter for their calls to lock_acquire() is unset. Which means RCU read locks are not added into the lockdep dependency graph. This is fine for all flavors except sleepable RCU, beca