rcu: Default RCU_FANOUT_LEAF to 16 unless explicitly changed
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 3 Feb 2017 17:54:05 +0000 (09:54 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 18 Apr 2017 18:38:18 +0000 (11:38 -0700)
commitb8c78d3afc6aac1c722af3bec18959c6bd93231c
treedb484e9bace61147bdd18855c6e65511fb7802a3
parent9226b10d78ffe7895549045fe388dc5e73b87eac
rcu: Default RCU_FANOUT_LEAF to 16 unless explicitly changed

If the RCU_EXPERT Kconfig option is not set (the default), then the
RCU_FANOUT_LEAF Kconfig option will not be defined, which will cause
the leaf-level rcu_node tree fanout to default to 32 on 32-bit systems
and 64 on 64-bit systems.  This can result in excessive lock contention.
This commit therefore changes the computation of the leaf-level rcu_node
tree fanout so that the result will be 16 unless an explicit Kconfig or
kernel-boot setting says otherwise.

Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.h