]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rcu/nocb: Advance CBs after merge in rcutree_migrate_callbacks()
authorPaul E. McKenney <paulmck@linux.ibm.com>
Wed, 10 Jul 2019 19:54:56 +0000 (12:54 -0700)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Tue, 13 Aug 2019 21:38:24 +0000 (14:38 -0700)
The rcutree_migrate_callbacks() invokes rcu_advance_cbs() on both the
offlined CPU's ->cblist and that of the surviving CPU, then merges
them.  However, after the merge, and of the offlined CPU's callbacks
that were not ready to be invoked will no longer be associated with a
grace-period number.  This commit therefore invokes rcu_advance_cbs()
one more time on the merged ->cblist in order to assign a grace-period
number to these callbacks.

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

index 457623100d1232a86018f5f6c467b7b363ba8bac..3e89b5b83ea01e3afed2dddde66ca0e1235c43df 100644 (file)
@@ -3205,6 +3205,7 @@ void rcutree_migrate_callbacks(int cpu)
        needwake = rcu_advance_cbs(my_rnp, rdp) ||
                   rcu_advance_cbs(my_rnp, my_rdp);
        rcu_segcblist_merge(&my_rdp->cblist, &rdp->cblist);
+       needwake = needwake || rcu_advance_cbs(my_rnp, my_rdp);
        rcu_segcblist_disable(&rdp->cblist);
        WARN_ON_ONCE(rcu_segcblist_empty(&my_rdp->cblist) !=
                     !rcu_segcblist_n_cbs(&my_rdp->cblist));