rcutorture: Consolidate rcu_torture_boost() timing and statistics
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 8 Apr 2021 03:00:00 +0000 (20:00 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 10 May 2021 23:05:06 +0000 (16:05 -0700)
commit8c7ec02e2a69807db8024635b48829dca5701c42
tree6f1b3c86410309425463f6aa77683a0e74689ca1
parent7b9dad7abad70750c7fbacd5eb5e917f73b42759
rcutorture: Consolidate rcu_torture_boost() timing and statistics

This commit consolidates two loops in rcu_torture_boost(), one of which
counts the number of boost-test episodes and the other of which computes
the start time of the next episode, into one loop that does both with but
a single acquisition of boost_mutex.  This means that the count of the
number of boost-test episodes is incremented after an episode completes
rather than before it starts, but it also avoids the over-counting that
was possible previously.

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