rcutorture: Make rcu_fwd_cb_nodelay be a counter
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 17 Dec 2021 20:33:53 +0000 (12:33 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 2 Feb 2022 01:24:38 +0000 (17:24 -0800)
commite22ef8df415d924428e35c9c112526306e684adc
tree5eb2f1dd48b8eb0cea56e803ce0735e9c5eda022
parent05b724655bf1908abf531dd0bce455e55703a3a8
rcutorture: Make rcu_fwd_cb_nodelay be a counter

Back when only one rcutorture kthread could do forward-progress testing,
it was just fine for rcu_fwd_cb_nodelay to be a non-atomic bool.  It was
set at the start of forward-progress testing and cleared at the end.
But now that there are multiple threads, the value can be cleared while
one of the threads is still doing forward-progress testing.  This commit
therefore makes rcu_fwd_cb_nodelay be an atomic counter, replacing the
WRITE_ONCE() operations with atomic_inc() and atomic_dec().

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/rcutorture.c