Skip to content

Commit ebb6d30

Browse files
jlellipaulmckrcu
authored andcommitted
rcu: Make rcu_normal_after_boot writable again
Certain configurations (e.g., systems that make heavy use of netns) need to use synchronize_rcu_expedited() to service RCU grace periods even after boot. Even though synchronize_rcu_expedited() has been traditionally considered harmful for RT for the heavy use of IPIs, it is perfectly usable under certain conditions (e.g. nohz_full). Make rcupdate.rcu_normal_after_boot= again writeable on RT (if NO_HZ_ FULL is defined), but keep its default value to 1 (enabled) to avoid regressions. Users who need synchronize_rcu_expedited() will boot with rcupdate.rcu_normal_after_ boot=0 in the kernel cmdline. Reflect the change in synchronize_rcu_expedited_wait() by removing the WARN related to CONFIG_PREEMPT_RT. Signed-off-by: Juri Lelli <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 4aa846f commit ebb6d30

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

kernel/rcu/tree_exp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,6 @@ static void synchronize_rcu_expedited_wait(void)
512512
j = READ_ONCE(jiffies_till_first_fqs);
513513
if (synchronize_rcu_expedited_wait_once(j + HZ))
514514
return;
515-
WARN_ON_ONCE(IS_ENABLED(CONFIG_PREEMPT_RT));
516515
}
517516

518517
for (;;) {

kernel/rcu/update.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
module_param(rcu_expedited, int, 0);
5858
module_param(rcu_normal, int, 0);
5959
static int rcu_normal_after_boot = IS_ENABLED(CONFIG_PREEMPT_RT);
60-
#ifndef CONFIG_PREEMPT_RT
60+
#if !defined(CONFIG_PREEMPT_RT) || defined(CONFIG_NO_HZ_FULL)
6161
module_param(rcu_normal_after_boot, int, 0);
6262
#endif
6363
#endif /* #ifndef CONFIG_TINY_RCU */

0 commit comments

Comments
 (0)