diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-04-21 12:22:14 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-05-27 15:59:06 -0400 |
commit | 26730f55c2842b4ee06a5307d58265db7dd26065 (patch) | |
tree | 98ea25356350f8ce1b694b704ddf9b3700daf16f | |
parent | 47d631af58bb9b2f2dd3d0da8c98a79a5e75c738 (diff) |
rcu: Make RCU able to tolerate undefined CONFIG_RCU_KTHREAD_PRIO
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>
-rw-r--r-- | init/Kconfig | 1 | ||||
-rw-r--r-- | kernel/rcu/tree.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig index 78176001f73b..af2c93c4a105 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -671,6 +671,7 @@ config RCU_KTHREAD_PRIO | |||
671 | range 0 99 if !RCU_BOOST | 671 | range 0 99 if !RCU_BOOST |
672 | default 1 if RCU_BOOST | 672 | default 1 if RCU_BOOST |
673 | default 0 if !RCU_BOOST | 673 | default 0 if !RCU_BOOST |
674 | depends on RCU_EXPERT | ||
674 | help | 675 | help |
675 | This option specifies the SCHED_FIFO priority value that will be | 676 | This option specifies the SCHED_FIFO priority value that will be |
676 | assigned to the rcuc/n and rcub/n threads and is also the value | 677 | assigned to the rcuc/n and rcub/n threads and is also the value |
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 1edd11298224..0e9ce1272971 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
@@ -165,7 +165,11 @@ static void invoke_rcu_core(void); | |||
165 | static void invoke_rcu_callbacks(struct rcu_state *rsp, struct rcu_data *rdp); | 165 | static void invoke_rcu_callbacks(struct rcu_state *rsp, struct rcu_data *rdp); |
166 | 166 | ||
167 | /* rcuc/rcub kthread realtime priority */ | 167 | /* rcuc/rcub kthread realtime priority */ |
168 | #ifdef CONFIG_RCU_KTHREAD_PRIO | ||
168 | static int kthread_prio = CONFIG_RCU_KTHREAD_PRIO; | 169 | static int kthread_prio = CONFIG_RCU_KTHREAD_PRIO; |
170 | #else /* #ifdef CONFIG_RCU_KTHREAD_PRIO */ | ||
171 | static int kthread_prio = IS_ENABLED(CONFIG_RCU_BOOST) ? 1 : 0; | ||
172 | #endif /* #else #ifdef CONFIG_RCU_KTHREAD_PRIO */ | ||
169 | module_param(kthread_prio, int, 0644); | 173 | module_param(kthread_prio, int, 0644); |
170 | 174 | ||
171 | /* Delay in jiffies for grace-period initialization delays, debug only. */ | 175 | /* Delay in jiffies for grace-period initialization delays, debug only. */ |