diff mbox

[tip/core/rcu,43/55] rcu: Make rcu_torture_boost() exit loops at end of test

Message ID 1315332049-2604-43-git-send-email-paulmck@linux.vnet.ibm.com
State Accepted
Commit ab8f11e5f6655861ad4758a7da76b2fc0e0dcc98
Headers show

Commit Message

Paul E. McKenney Sept. 6, 2011, 6 p.m. UTC
From: Paul E. McKenney <paul.mckenney@linaro.org>

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 <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 kernel/rcutorture.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index eb739c0..76fe893 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -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;