[PATCH v6 2/2] rcu: Offload callback processing from all CPUs in the absence of rcu_nocbs=

From: Zhen Lei
Date: Thu Sep 01 2022 - 09:19:12 EST


Offload callback processing from all CPUs as long as there is no
"rcu_nocbs=" boot parameter. This also means: whether
CONFIG_RCU_NOCB_CPU_DEFAULT_ALL=y takes effect does not depend on
the absence of "nohz_full=".

Suggested-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
Signed-off-by: Zhen Lei <thunder.leizhen@xxxxxxxxxx>
---
kernel/rcu/Kconfig | 4 ++--
kernel/rcu/tree_nocb.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/rcu/Kconfig b/kernel/rcu/Kconfig
index d471d22a5e21b43..35b94f5f6767f00 100644
--- a/kernel/rcu/Kconfig
+++ b/kernel/rcu/Kconfig
@@ -270,8 +270,8 @@ config RCU_NOCB_CPU_DEFAULT_ALL
default n
help
Use this option to offload callback processing from all CPUs
- by default, in the absence of the rcu_nocbs or nohz_full boot
- parameter. This also avoids the need to use any boot parameters
+ by default, in the absence of the rcu_nocbs boot parameter.
+ This also avoids the need to use any boot parameters
to achieve the effect of offloading all CPUs on boot.

Say Y here if you want offload all CPUs by default on boot.
diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h
index 8b6dceeabde0b4d..cfbdd78d6c33158 100644
--- a/kernel/rcu/tree_nocb.h
+++ b/kernel/rcu/tree_nocb.h
@@ -1219,7 +1219,7 @@ void __init rcu_init_nohz(void)
#endif

#if defined(CONFIG_RCU_NOCB_CPU_DEFAULT_ALL)
- if (!rcu_state.nocb_is_setup && !cpumask)
+ if (!rcu_state.nocb_is_setup)
cpumask = cpu_possible_mask;
#endif

--
2.25.1