rcu: Kick rcuo kthreads after their CPU goes offline
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 23 Oct 2014 17:50:41 +0000 (10:50 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 29 Oct 2014 17:20:07 +0000 (10:20 -0700)
If a no-CBs CPU were to post an RCU callback with interrupts disabled
after it entered the idle loop for the last time, there might be no
deferred wakeup for the corresponding rcuo kthreads.  This commit
therefore adds a set of calls to do_nocb_deferred_wakeup() after the
CPU has gone completely offline.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c

index 9e3c20f117cd635ec41b4c0988082e3c7c44545e..07bf4aa68d5012a144ab5a3db0b48a7b5b8ac557 100644 (file)
@@ -3497,8 +3497,10 @@ static int rcu_cpu_notify(struct notifier_block *self,
        case CPU_DEAD_FROZEN:
        case CPU_UP_CANCELED:
        case CPU_UP_CANCELED_FROZEN:
-               for_each_rcu_flavor(rsp)
+               for_each_rcu_flavor(rsp) {
                        rcu_cleanup_dead_cpu(cpu, rsp);
+                       do_nocb_deferred_wakeup(per_cpu_ptr(rsp->rda, cpu));
+               }
                break;
        default:
                break;