Re: [PATCH RT v3 1/5] rcu: Acquire RCU lock when disabling BHs

2019-09-23 Thread Sebastian Andrzej Siewior
On 2019-09-17 11:12:48 [-0500], Scott Wood wrote: > > rcu_read_lock() does: > > > __rcu_read_lock(); > > > __acquire(RCU); > > > rcu_lock_acquire(_lock_map); > > > RCU_LOCKDEP_WARN(!rcu_is_watching(), > > > "rcu_read_lock() used illegally

Re: [PATCH RT v3 1/5] rcu: Acquire RCU lock when disabling BHs

2019-09-17 Thread Scott Wood
On Tue, 2019-09-17 at 16:42 +0200, Sebastian Andrzej Siewior wrote: > On 2019-09-17 09:06:28 [-0500], Scott Wood wrote: > > Sorry, I missed that you were asking about rcu_read_lock_bh() as > > well. I > > did remove the change to rcu_read_lock_bh_held(). > > Sorry for not being clear here. > >

Re: [PATCH RT v3 1/5] rcu: Acquire RCU lock when disabling BHs

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-09-17 09:06:28 [-0500], Scott Wood wrote: > Sorry, I missed that you were asking about rcu_read_lock_bh() as well. I > did remove the change to rcu_read_lock_bh_held(). Sorry for not being clear here. > With this patch, local_bh_disable() calls rcu_read_lock() on RT which > handles this

Re: [PATCH RT v3 1/5] rcu: Acquire RCU lock when disabling BHs

2019-09-17 Thread Scott Wood
On Tue, 2019-09-17 at 09:44 +0200, Sebastian Andrzej Siewior wrote: > On 2019-09-11 17:57:25 [+0100], Scott Wood wrote: > > > > @@ -615,10 +645,7 @@ static inline void rcu_read_unlock(void) > > static inline void rcu_read_lock_bh(void) > > { > > local_bh_disable(); > > -

Re: [PATCH RT v3 1/5] rcu: Acquire RCU lock when disabling BHs

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-09-11 17:57:25 [+0100], Scott Wood wrote: > index 388ace315f32..9ce7c5006a5e 100644 > --- a/include/linux/rcupdate.h > +++ b/include/linux/rcupdate.h > @@ -600,6 +600,36 @@ static inline void rcu_read_unlock(void) > rcu_lock_release(_lock_map); /* Keep acq info for rls diags. */ > }

Re: [PATCH RT v3 1/5] rcu: Acquire RCU lock when disabling BHs

2019-09-12 Thread Joel Fernandes
On Wed, Sep 11, 2019 at 05:57:25PM +0100, Scott Wood wrote: > A plain local_bh_disable() is documented as creating an RCU critical > section, and (at least) rcutorture expects this to be the case. However, > in_softirq() doesn't block a grace period on PREEMPT_RT, since RCU checks >

[PATCH RT v3 1/5] rcu: Acquire RCU lock when disabling BHs

2019-09-11 Thread Scott Wood
A plain local_bh_disable() is documented as creating an RCU critical section, and (at least) rcutorture expects this to be the case. However, in_softirq() doesn't block a grace period on PREEMPT_RT, since RCU checks preempt_count() directly. Even if RCU were changed to check in_softirq(), that