summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-02-03 18:54:05 +0100
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-04-18 20:38:18 +0200
commitb8c78d3afc6aac1c722af3bec18959c6bd93231c (patch)
treedb484e9bace61147bdd18855c6e65511fb7802a3 /kernel
parentrcu: Place guard on rcu_all_qs() and rcu_note_context_switch() actions (diff)
downloadlinux-b8c78d3afc6aac1c722af3bec18959c6bd93231c.tar.xz
linux-b8c78d3afc6aac1c722af3bec18959c6bd93231c.zip
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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rcu/tree.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index d2f276fc2edc..376c01e539c7 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -52,11 +52,7 @@
#ifdef CONFIG_RCU_FANOUT_LEAF
#define RCU_FANOUT_LEAF CONFIG_RCU_FANOUT_LEAF
#else /* #ifdef CONFIG_RCU_FANOUT_LEAF */
-# ifdef CONFIG_64BIT
-# define RCU_FANOUT_LEAF 64
-# else
-# define RCU_FANOUT_LEAF 32
-# endif
+#define RCU_FANOUT_LEAF 16
#endif /* #else #ifdef CONFIG_RCU_FANOUT_LEAF */
#define RCU_FANOUT_1 (RCU_FANOUT_LEAF)