tegrakernel/kernel/kernel-4.9/rt-patches/0041-rcu-update-make-RCU_EX...

69 lines
2.1 KiB
Diff
Raw Normal View History

2022-02-16 09:13:02 -06:00
From 66e68a92a0c6ad1224c97577408f610651ff4c61 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 2 Nov 2016 16:45:58 +0100
Subject: [PATCH 041/365] rcu: update: make RCU_EXPEDITE_BOOT default
RCU_EXPEDITE_BOOT should speed up the boot process by enforcing
synchronize_rcu_expedited() instead of synchronize_rcu() during the boot
process. There should be no reason why one does not want this and there
is no need worry about real time latency at this point.
Therefore make it default.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
init/Kconfig | 13 -------------
kernel/rcu/update.c | 6 ++----
2 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
index cefd06480226..c0c36e5a417a 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -790,19 +790,6 @@ config RCU_NOCB_CPU_ALL
endchoice
-config RCU_EXPEDITE_BOOT
- bool
- default n
- help
- This option enables expedited grace periods at boot time,
- as if rcu_expedite_gp() had been invoked early in boot.
- The corresponding rcu_unexpedite_gp() is invoked from
- rcu_end_inkernel_boot(), which is intended to be invoked
- at the end of the kernel-only boot sequence, just before
- init is exec'ed.
-
- Accept the default if unsure.
-
endmenu # "RCU Subsystem"
config BUILD_BIN2C
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index 4f6db7e6a117..019b4708c9fa 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -132,8 +132,7 @@ bool rcu_gp_is_normal(void)
}
EXPORT_SYMBOL_GPL(rcu_gp_is_normal);
-static atomic_t rcu_expedited_nesting =
- ATOMIC_INIT(IS_ENABLED(CONFIG_RCU_EXPEDITE_BOOT) ? 1 : 0);
+static atomic_t rcu_expedited_nesting = ATOMIC_INIT(1);
/*
* Should normal grace-period primitives be expedited? Intended for
@@ -182,8 +181,7 @@ EXPORT_SYMBOL_GPL(rcu_unexpedite_gp);
*/
void rcu_end_inkernel_boot(void)
{
- if (IS_ENABLED(CONFIG_RCU_EXPEDITE_BOOT))
- rcu_unexpedite_gp();
+ rcu_unexpedite_gp();
if (rcu_normal_after_boot)
WRITE_ONCE(rcu_normal, 1);
}
--
2.28.0