aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-04-19 15:20:14 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-04-24 23:54:52 -0400
commit8932a63d5edb02f714d50c26583152fe0a97a69c (patch)
treeec71159908f1a78eb21e736d284ffe7ed7584b6c /kernel/rcutree.c
parentd8169d4c369e8aa2fda10df705a4957331b5a4db (diff)
rcu: Reduce cache-miss initialization latencies for large systems
Commit #0209f649 (rcu: limit rcu_node leaf-level fanout) set an upper limit of 16 on the leaf-level fanout for the rcu_node tree. This was needed to reduce lock contention that was induced by the synchronization of scheduling-clock interrupts, which was in turn needed to improve energy efficiency for moderate-sized lightly loaded servers. However, reducing the leaf-level fanout means that there are more leaf-level rcu_node structures in the tree, which in turn means that RCU's grace-period initialization incurs more cache misses. This is not a problem on moderate-sized servers with only a few tens of CPUs, but becomes a major source of real-time latency spikes on systems with many hundreds of CPUs. In addition, the workloads running on these large systems tend to be CPU-bound, which eliminates the energy-efficiency advantages of synchronizing scheduling-clock interrupts. Therefore, these systems need maximal values for the rcu_node leaf-level fanout. This commit addresses this problem by introducing a new kernel parameter named RCU_FANOUT_LEAF that directly controls the leaf-level fanout. This parameter defaults to 16 to handle the common case of a moderate sized lightly loaded servers, but may be set higher on larger systems. Reported-by: Mike Galbraith <efault@gmx.de> Reported-by: Dimitri Sivanich <sivanich@sgi.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r--kernel/rcutree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 1050d6d3922c..780acf8e15e9 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -2418,7 +2418,7 @@ static void __init rcu_init_levelspread(struct rcu_state *rsp)
2418 2418
2419 for (i = NUM_RCU_LVLS - 1; i > 0; i--) 2419 for (i = NUM_RCU_LVLS - 1; i > 0; i--)
2420 rsp->levelspread[i] = CONFIG_RCU_FANOUT; 2420 rsp->levelspread[i] = CONFIG_RCU_FANOUT;
2421 rsp->levelspread[0] = RCU_FANOUT_LEAF; 2421 rsp->levelspread[0] = CONFIG_RCU_FANOUT_LEAF;
2422} 2422}
2423#else /* #ifdef CONFIG_RCU_FANOUT_EXACT */ 2423#else /* #ifdef CONFIG_RCU_FANOUT_EXACT */
2424static void __init rcu_init_levelspread(struct rcu_state *rsp) 2424static void __init rcu_init_levelspread(struct rcu_state *rsp)