Skip to content

Commit

Permalink
rcu: Make rcu_torture_boost() exit loops at end of test
Browse files Browse the repository at this point in the history
One of the loops in rcu_torture_boost() fails to check kthread_should_stop(),
and thus might be slowing or even stopping completion of rcutorture tests
at rmmod time.  This commit adds the kthread_should_stop() check to the
offending loop.

Signed-off-by: Paul E. McKenney <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
  • Loading branch information
Paul E. McKenney authored and paulmck committed Sep 29, 2011
1 parent 93898fb commit ab8f11e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/rcutorture.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,8 @@ static int rcu_torture_boost(void *arg)
* interval. Besides, we are running at RT priority,
* so delays should be relatively rare.
*/
while (oldstarttime == boost_starttime) {
while (oldstarttime == boost_starttime &&
!kthread_should_stop()) {
if (mutex_trylock(&boost_mutex)) {
boost_starttime = jiffies +
test_boost_interval * HZ;
Expand Down

0 comments on commit ab8f11e

Please sign in to comment.