srcu: Make srcu_funnel_gp_start() cache ->mynode in snp_leaf
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 20 Jan 2022 21:39:33 +0000 (13:39 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 2 Feb 2022 01:22:54 +0000 (17:22 -0800)
commit1a96a2501ad2f074f42efd3b09a5655d3c2dac3c
tree7ff50a3f88e63b630dd278968ed04073001ab29b
parent0476dec8bf3c95aca88fb6fd5b97861e5a64d572
srcu: Make srcu_funnel_gp_start() cache ->mynode in snp_leaf

Currently, the srcu_funnel_gp_start() walks its local variable snp up the
tree and reloads sdp->mynode whenever it is necessary to check whether
it is still at the leaf srcu_node level.  This works, but is a bit more
obtuse than absolutely necessary.  In addition, upcoming commits will
dynamically size srcu_struct structures, in which case sdp->mynode will
no longer necessarily be a constant, and this commit helps prepare for
that dynamic sizing.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/srcutree.c