]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
rcu: Convert CONFIG_RCU_FANOUT_EXACT to boot parameter
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 20 Apr 2015 17:27:15 +0000 (10:27 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 27 May 2015 19:59:04 +0000 (12:59 -0700)
The CONFIG_RCU_FANOUT_EXACT Kconfig parameter is used primarily (and
perhaps only) by rcutorture to verify that RCU works correctly in specific
rcu_node combining-tree configurations.  It therefore does not make
much sense have this as a question to people attempting to configure
their kernels.  So this commit creates an rcutree.rcu_fanout_exact=
boot parameter that rcutorture can use, and eliminates the original
CONFIG_RCU_FANOUT_EXACT Kconfig parameter.

Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Pranith Kumar <bobby.prani@gmail.com>
Documentation/kernel-parameters.txt
init/Kconfig
kernel/rcu/tree.c
kernel/rcu/tree_plugin.h

index 10a4fb80c0333b2006bfb0e5ac6121a5f405a2c9..f5582dcdf80d56c25816ec133280965b47ba7525 100644 (file)
@@ -3010,6 +3010,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
                        the rcu_node combining tree.  This only has effect
                        when CONFIG_RCU_TORTURE_TEST_SLOW_PREINIT is set.
 
+       rcutree.rcu_fanout_exact= [KNL]
+                       Disable autobalancing of the rcu_node combining
+                       tree.  This is used by rcutorture, and might
+                       possibly be useful for architectures having high
+                       cache-to-cache transfer latencies.
+
        rcutree.rcu_fanout_leaf= [KNL]
                        Increase the number of CPUs assigned to each
                        leaf rcu_node structure.  Useful for very large
index 92721081018964920245718f2f7a3482a9f126fa..0ec82362cfc0f20a2cc81d2616366e8854a471ea 100644 (file)
@@ -611,20 +611,6 @@ config RCU_FANOUT_LEAF
 
          Take the default if unsure.
 
-config RCU_FANOUT_EXACT
-       bool "Disable tree-based hierarchical RCU auto-balancing"
-       depends on TREE_RCU || PREEMPT_RCU
-       default n
-       help
-         This option forces use of the exact RCU_FANOUT value specified,
-         regardless of imbalances in the hierarchy.  This is useful for
-         testing RCU itself, and might one day be useful on systems with
-         strong NUMA behavior.
-
-         Without RCU_FANOUT_EXACT, the code will balance the hierarchy.
-
-         Say N if unsure.
-
 config RCU_FAST_NO_HZ
        bool "Accelerate last non-dyntick-idle CPU's grace periods"
        depends on NO_HZ_COMMON && SMP
index 2f3cb5513ca3bbb26e9293264b5d095bb8841784..b49c474e1fffa1cc0b08a815147b2fa6f1f2c8f7 100644 (file)
@@ -113,6 +113,9 @@ RCU_STATE_INITIALIZER(rcu_bh, 'b', call_rcu_bh);
 static struct rcu_state *rcu_state_p;
 LIST_HEAD(rcu_struct_flavors);
 
+/* Control rcu_node-tree auto-balancing at boot time. */
+static bool rcu_fanout_exact;
+module_param(rcu_fanout_exact, bool, 0444);
 /* Increase (but not decrease) the CONFIG_RCU_FANOUT_LEAF at boot time. */
 static int rcu_fanout_leaf = CONFIG_RCU_FANOUT_LEAF;
 module_param(rcu_fanout_leaf, int, 0444);
@@ -3956,13 +3959,13 @@ void rcu_scheduler_starting(void)
 
 /*
  * Compute the per-level fanout, either using the exact fanout specified
- * or balancing the tree, depending on CONFIG_RCU_FANOUT_EXACT.
+ * or balancing the tree, depending on the rcu_fanout_exact boot parameter.
  */
 static void __init rcu_init_levelspread(struct rcu_state *rsp)
 {
        int i;
 
-       if (IS_ENABLED(CONFIG_RCU_FANOUT_EXACT)) {
+       if (rcu_fanout_exact) {
                rsp->levelspread[rcu_num_lvls - 1] = rcu_fanout_leaf;
                for (i = rcu_num_lvls - 2; i >= 0; i--)
                        rsp->levelspread[i] = CONFIG_RCU_FANOUT;
index 58b1ebdc43879f0b5bd04d833f949e8d15d0a0e8..eb460ec747ef0d8d54eb4295f82480b04d81c24f 100644 (file)
@@ -64,7 +64,7 @@ static void __init rcu_bootup_announce_oddness(void)
            (!IS_ENABLED(CONFIG_64BIT) && CONFIG_RCU_FANOUT != 32))
                pr_info("\tCONFIG_RCU_FANOUT set to non-default value of %d\n",
                       CONFIG_RCU_FANOUT);
-       if (IS_ENABLED(CONFIG_RCU_FANOUT_EXACT))
+       if (rcu_fanout_exact)
                pr_info("\tHierarchical RCU autobalancing is disabled.\n");
        if (IS_ENABLED(CONFIG_RCU_FAST_NO_HZ))
                pr_info("\tRCU dyntick-idle grace-period acceleration is enabled.\n");