]> git.baikalelectronics.ru Git - kernel.git/commit
rcu: Make rcu_init_new_rnp() stop upon already-set bit
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 2 May 2018 21:46:43 +0000 (14:46 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 12 Jul 2018 22:38:59 +0000 (15:38 -0700)
commit3238ea262da12b58ff820c06a8cd64da897bf792
tree6ca1c30d5d329b35398a74752b4fea310acbc177
parentb9551eb2e730283003d89f58ca9601b22fc00870
rcu: Make rcu_init_new_rnp() stop upon already-set bit

Currently, rcu_init_new_rnp() walks up the rcu_node combining tree,
setting bits in the ->qsmaskinit fields on the way up.  It walks up
unconditionally, regardless of the initial state of these bits.  This is
OK because only the corresponding RCU grace-period kthread ever tests
or sets these bits during runtime.  However, it is also pointless, and
it increases both memory and lock contention (albeit only slightly), so
this commit stops the walk as soon as an already-set bit is encountered.

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