rcu: Reduce leaf fanout for strict RCU grace periods
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 5 Aug 2020 23:52:17 +0000 (16:52 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 25 Aug 2020 01:40:23 +0000 (18:40 -0700)
commitdc1269186bed3afc5a2018527516be84fe55d3e0
tree60ef8b9f467c3cbdda1655f840c96346527080ab
parent8cbd0e38a9f2de38e8991c5c1c6f9024b2731d17
rcu: Reduce leaf fanout for strict RCU grace periods

Because strict RCU grace periods will complete more quickly, they will
experience greater lock contention on each leaf rcu_node structure's
->lock.  This commit therefore reduces the leaf fanout in order to reduce
this lock contention.

Note that this also has the effect of reducing the number of CPUs
supported to 16 in the case of CONFIG_RCU_FANOUT_LEAF=2 or 81 in the
case of CONFIG_RCU_FANOUT_LEAF=3.  However, greater numbers of CPUs are
probably a bad idea when using CONFIG_RCU_STRICT_GRACE_PERIOD=y.  Those
wishing to live dangerously are free to edit their kernel/rcu/Kconfig
files accordingly.

Reported-by Jann Horn <jannh@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/Kconfig