diff options
author | 2015-11-25 18:56:00 -0800 | |
---|---|---|
committer | 2015-12-04 12:26:54 -0800 | |
commit | 3e42ec1aa716f10c68294b8492ae3ea684528699 (patch) | |
tree | be431b624157914bd08d965fed9423fe267ff927 /kernel/rcu/update.c | |
parent | rcu: Wire up rcu_end_inkernel_boot() (diff) | |
download | linux-3e42ec1aa716f10c68294b8492ae3ea684528699.tar.gz linux-3e42ec1aa716f10c68294b8492ae3ea684528699.tar.bz2 linux-3e42ec1aa716f10c68294b8492ae3ea684528699.zip |
rcu: Allow expedited grace periods to be disabled at init
Expedited grace periods can speed up boot, but are undesirable in
aggressive real-time systems. This commit therefore introduces a
kernel parameter rcupdate.rcu_normal_after_boot that disables
expedited grace periods just before init is spawned.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu/update.c')
-rw-r--r-- | kernel/rcu/update.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c index 8fccda3a794d..12b91f5a60a6 100644 --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c @@ -63,6 +63,9 @@ MODULE_ALIAS("rcupdate"); module_param(rcu_expedited, int, 0); module_param(rcu_normal, int, 0); +static int rcu_normal_after_boot; +module_param(rcu_normal_after_boot, int, 0); + #if defined(CONFIG_DEBUG_LOCK_ALLOC) && defined(CONFIG_PREEMPT_COUNT) /** * rcu_read_lock_sched_held() - might we be in RCU-sched read-side critical section? @@ -178,6 +181,8 @@ void rcu_end_inkernel_boot(void) { if (IS_ENABLED(CONFIG_RCU_EXPEDITE_BOOT)) rcu_unexpedite_gp(); + if (rcu_normal_after_boot) + WRITE_ONCE(rcu_normal, 1); } #ifdef CONFIG_PREEMPT_RCU |