]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
rcu: Make rcu_torture_boost() exit loops at end of test
authorPaul E. McKenney <paul.mckenney@linaro.org>
Thu, 18 Aug 2011 16:30:32 +0000 (09:30 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 29 Sep 2011 04:38:46 +0000 (21:38 -0700)
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

index 2431d576e9cabbd436d0b1a29c2cae04ffc245b0..764825c2685c494b6839acaac1b25e500db610c5 100644 (file)
@@ -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;