Re: [PATCH 06/16] rcu/nocb: Avoid confusing double write of rdp->nocb_cb_sleep

2021-01-28 Thread Paul E. McKenney
On Thu, Jan 28, 2021 at 06:12:12PM +0100, Frederic Weisbecker wrote: > rdp->nocb_cb_sleep is first set to true by default after processing > the callbacks then set back to false if we still find ready callbacks > to invoke. > > This is confusing and even unsafe if it ever happens to be read > lock

[PATCH 06/16] rcu/nocb: Avoid confusing double write of rdp->nocb_cb_sleep

2021-01-28 Thread Frederic Weisbecker
rdp->nocb_cb_sleep is first set to true by default after processing the callbacks then set back to false if we still find ready callbacks to invoke. This is confusing and even unsafe if it ever happens to be read locklessly at some point. So make sure we write it only once per nocb_cb_wait() loop.