]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rcu: Shrink RCU based on number of CPUs
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 6 Sep 2012 22:38:02 +0000 (15:38 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 6 Sep 2012 22:38:02 +0000 (15:38 -0700)
commit5e9c338fddb1a9af8abea27809a9152586f3dc41
treec95da9b609dce22145f03759175a619620e9a676
parenta0416ec1031aee7a0b64987aece521f408ed5745
rcu: Shrink RCU based on number of CPUs

Currently, rcu_init_geometry() only reshapes RCU's combining trees
if the leaf fanout is changed at boot time.  This means that by
default, kernels compiled with (say) NR_CPUS=4096 will keep oversized
data structures, even when running on systems with (say) four CPUs.

This commit therefore checks to see if the maximum number of CPUs on
the actual running system (nr_cpu_ids) differs from NR_CPUS, and if so
reshapes the combining trees accordingly.

Reported-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcutree.c