rcu/nocb: Make rcutree_migrate_callbacks() start at leaf rcu_node structure
authorPaul E. McKenney <paulmck@linux.ibm.com>
Tue, 16 Apr 2019 21:09:15 +0000 (14:09 -0700)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Tue, 13 Aug 2019 21:35:49 +0000 (14:35 -0700)
commitc00045be32fe13333ba8c62748ba04747c182838
treef62d6a3588c76d30d16e9f720fa30c5d8f4106ea
parent750d7f6a434ff4640fa825dfb1eccb44e79fb6af
rcu/nocb: Make rcutree_migrate_callbacks() start at leaf rcu_node structure

Because rcutree_migrate_callbacks() is invoked infrequently and because
an exact snapshot of the grace-period state might save some callbacks a
second trip through a grace period, this function has used the root
rcu_node structure.  However, this safe-second-trip optimization
happens only if rcutree_migrate_callbacks() races with grace-period
initialization, so it is not worth the added mental load.  This commit
therefore makes rcutree_migrate_callbacks() start with the leaf rcu_node
structures, as is done elsewhere.

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