rcu: Make RCU able to tolerate undefined CONFIG_RCU_KTHREAD_PRIO
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 21 Apr 2015 16:22:14 +0000 (09:22 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 27 May 2015 19:59:06 +0000 (12:59 -0700)
This commit updates the initialization of the kthread_prio boot parameter
so that RCU will build even when CONFIG_RCU_KTHREAD_PRIO is undefined.
The kthread_prio boot parameter is set to CONFIG_RCU_KTHREAD_PRIO if
that is defined, otherwise to 1 if CONFIG_RCU_BOOST is defined and
to zero otherwise.  This commit then makes CONFIG_RCU_KTHREAD_PRIO
depend on CONFIG_RCU_EXPERT, so that Kconfig users won't be asked about
CONFIG_RCU_KTHREAD_PRIO unless they want to be.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
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>
init/Kconfig
kernel/rcu/tree.c

index 78176001f73b706d2c21c63a5ee3798a9a4f50d5..af2c93c4a105857d8998cf82b6d2a86c94508eda 100644 (file)
@@ -671,6 +671,7 @@ config RCU_KTHREAD_PRIO
        range 0 99 if !RCU_BOOST
        default 1 if RCU_BOOST
        default 0 if !RCU_BOOST
+       depends on RCU_EXPERT
        help
          This option specifies the SCHED_FIFO priority value that will be
          assigned to the rcuc/n and rcub/n threads and is also the value
index 1edd112982248528548f14557c76fb15cccc0bfb..0e9ce1272971bf270f2fd14fe5501e31f53c585e 100644 (file)
@@ -165,7 +165,11 @@ static void invoke_rcu_core(void);
 static void invoke_rcu_callbacks(struct rcu_state *rsp, struct rcu_data *rdp);
 
 /* rcuc/rcub kthread realtime priority */
+#ifdef CONFIG_RCU_KTHREAD_PRIO
 static int kthread_prio = CONFIG_RCU_KTHREAD_PRIO;
+#else /* #ifdef CONFIG_RCU_KTHREAD_PRIO */
+static int kthread_prio = IS_ENABLED(CONFIG_RCU_BOOST) ? 1 : 0;
+#endif /* #else #ifdef CONFIG_RCU_KTHREAD_PRIO */
 module_param(kthread_prio, int, 0644);
 
 /* Delay in jiffies for grace-period initialization delays, debug only. */
This page took 0.069206 seconds and 5 git commands to generate.