]> git.karo-electronics.de Git - linux-beck.git/commit
rcu: Size rcu_node tree from nr_cpu_ids rather than NR_CPUS
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 9 May 2012 04:00:28 +0000 (21:00 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 2 Jul 2012 19:33:21 +0000 (12:33 -0700)
commitcca6f3931920a7547d02e68adc2ca635bea5600c
tree31e2cd3d9e73f080ca78a89a6dba474c1987beee
parentcc5df65b0370fc6aa2bfe3bb19e0451d5cafb99f
rcu: Size rcu_node tree from nr_cpu_ids rather than NR_CPUS

The rcu_node tree array is sized based on compile-time constants,
including NR_CPUS.  Although this approach has worked well in the past,
the recent trend by many distros to define NR_CPUS=4096 results in
excessive grace-period-initialization latencies.

This commit therefore substitutes the run-time computed nr_cpu_ids for
the compile-time NR_CPUS when building the tree.  This can result in
much of the compile-time-allocated rcu_node array being unused.  If
this is a major problem, you are in a specialized situation anyway,
so you can manually adjust the NR_CPUS, RCU_FANOUT, and RCU_FANOUT_LEAF
kernel config parameters.

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