Commit d2cf0854 authored by Frederic Weisbecker's avatar Frederic Weisbecker Committed by Paul E. McKenney

rcu/nocb: Allow empty "rcu_nocbs" kernel parameter

Allow the rcu_nocbs kernel parameter to be specified just by itself,
without specifying any CPUs.  This allows systems administrators to use
"rcu_nocbs" to specify that none of the CPUs are to be offloaded at boot
time, but than any of them may be offloaded at runtime via cpusets.

In contrast, if the "rcu_nocbs" or "nohz_full" kernel parameters are not
specified at all, then not only are none of the CPUs offloaded at boot,
none of them can be offloaded at runtime, either.

While in the area, modernize the description of the "rcuo" kthreads'
naming scheme.
Reviewed-by: default avatarNeeraj Upadhyay <quic_neeraju@quicinc.com>
Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Uladzislau Rezki <urezki@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Joel Fernandes <joel@joelfernandes.org>
Tested-by: default avatarJuri Lelli <juri.lelli@redhat.com>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 2cf4528d
...@@ -4343,19 +4343,30 @@ ...@@ -4343,19 +4343,30 @@
Disable the Correctable Errors Collector, Disable the Correctable Errors Collector,
see CONFIG_RAS_CEC help text. see CONFIG_RAS_CEC help text.
rcu_nocbs= [KNL] rcu_nocbs[=cpu-list]
The argument is a cpu list, as described above. [KNL] The optional argument is a cpu list,
as described above.
In kernels built with CONFIG_RCU_NOCB_CPU=y, set
the specified list of CPUs to be no-callback CPUs. In kernels built with CONFIG_RCU_NOCB_CPU=y,
Invocation of these CPUs' RCU callbacks will be enable the no-callback CPU mode, which prevents
offloaded to "rcuox/N" kthreads created for that such CPUs' callbacks from being invoked in
purpose, where "x" is "p" for RCU-preempt, and softirq context. Invocation of such CPUs' RCU
"s" for RCU-sched, and "N" is the CPU number. callbacks will instead be offloaded to "rcuox/N"
This reduces OS jitter on the offloaded CPUs, kthreads created for that purpose, where "x" is
which can be useful for HPC and real-time "p" for RCU-preempt, "s" for RCU-sched, and "g"
workloads. It can also improve energy efficiency for the kthreads that mediate grace periods; and
for asymmetric multiprocessors. "N" is the CPU number. This reduces OS jitter on
the offloaded CPUs, which can be useful for HPC
and real-time workloads. It can also improve
energy efficiency for asymmetric multiprocessors.
If a cpulist is passed as an argument, the specified
list of CPUs is set to no-callback mode from boot.
Otherwise, if the '=' sign and the cpulist
arguments are omitted, no CPU will be set to
no-callback mode from boot but the mode may be
toggled at runtime via cpusets.
rcu_nocb_poll [KNL] rcu_nocb_poll [KNL]
Rather than requiring that offloaded CPUs Rather than requiring that offloaded CPUs
......
...@@ -66,14 +66,16 @@ static bool rcu_nocb_is_setup; ...@@ -66,14 +66,16 @@ static bool rcu_nocb_is_setup;
static int __init rcu_nocb_setup(char *str) static int __init rcu_nocb_setup(char *str)
{ {
alloc_bootmem_cpumask_var(&rcu_nocb_mask); alloc_bootmem_cpumask_var(&rcu_nocb_mask);
if (cpulist_parse(str, rcu_nocb_mask)) { if (*str == '=') {
pr_warn("rcu_nocbs= bad CPU range, all CPUs set\n"); if (cpulist_parse(++str, rcu_nocb_mask)) {
cpumask_setall(rcu_nocb_mask); pr_warn("rcu_nocbs= bad CPU range, all CPUs set\n");
cpumask_setall(rcu_nocb_mask);
}
} }
rcu_nocb_is_setup = true; rcu_nocb_is_setup = true;
return 1; return 1;
} }
__setup("rcu_nocbs=", rcu_nocb_setup); __setup("rcu_nocbs", rcu_nocb_setup);
static int __init parse_rcu_nocb_poll(char *arg) static int __init parse_rcu_nocb_poll(char *arg)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment