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

Sebastian Andrzej Siewior
2019-09-17T07:45:06Z

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(&rcu_lock_map); /* Keep acq info for rls diags. */
> }
>
> +#ifdef CONFIG_PREEMPT_RT_FULL
> +/*
> + * On RT, local_bh_disable() calls rcu_read_lock() -- no need to
> + * track it twice.
> + */
> +static inline void rcu_bh_lock_acquire(void)
> +{
> +}
> +
> +static inline void rcu_bh_lock_release(void)
> +{
> +}
> +#else
> +static inline void rcu_bh_lock_acquire(void)
> +{
> + __acquire(RCU_BH);
> + rcu_lock_acquire(&rcu_bh_lock_map);
> + RCU_LOCKDEP_WARN(!rcu_is_watching(),
> + "rcu_read_lock_bh() used illegally while idle");
> +}
> +
> +static inline void rcu_bh_lock_release(void)
> +{
> + RCU_LOCKDEP_WARN(!rcu_is_watching(),
> + "rcu_read_unlock_bh() used illegally while idle");
> + rcu_lock_release(&rcu_bh_lock_map);
> + __release(RCU_BH);
> +}
> +#endif
> +
> /**
> * rcu_read_lock_bh() - mark the beginning of an RCU-bh critical section
> *
> @@ -615,10 +645,7 @@ static inline void rcu_read_unlock(void)
> static inline void rcu_read_lock_bh(void)
> {
> local_bh_disable();
> - __acquire(RCU_BH);
> - rcu_lock_acquire(&rcu_bh_lock_map);
> - RCU_LOCKDEP_WARN(!rcu_is_watching(),
> - "rcu_read_lock_bh() used illegally while idle");
> + rcu_bh_lock_acquire();
> }
>
> /*

I asked previously why do you need to change rcu_read_lock_bh() and you
replied that you don't remember:
https://lore.kernel.org/linux-rt-users/b948ec6cccda31925ed8dc123bd0f55423fff3d4.camel@redhat.com/

Did this change?

Sebastian