# SPDX-License-Identifier: GPL-2.0-only
#
# RCU-related configuration options
#
menu "RCU Subsystem"
config [31mCONFIG_TREE_RCU[0m
bool
default y if ![31mCONFIG_PREEMPTION[0m && [31mCONFIG_SMP[0m
help
This option selects the RCU implementation that is
designed for very large [31mCONFIG_SMP[0m system with hundreds or
thousands of CPUs. It also scales down nicely to
smaller systems.
config [31mCONFIG_PREEMPT_RCU[0m
bool
default y if [31mCONFIG_PREEMPTION[0m
help
This option selects the RCU implementation that is
designed for very large [31mCONFIG_SMP[0m systems with hundreds or
thousands of CPUs, but for which real-time response
is also required. It also scales down nicely to
smaller systems.
Select this option if you are unsure.
config [31mCONFIG_TINY_RCU[0m
bool
default y if ![31mCONFIG_PREEMPTION[0m && ![31mCONFIG_SMP[0m
help
This option selects the RCU implementation that is
designed for UP systems from which real-time response
is not required. This option greatly reduces the
memory footprint of RCU.
config [31mCONFIG_RCU_EXPERT[0m
bool "Make expert-level adjustments to RCU configuration"
default n
help
This option needs to be enabled if you wish to make
expert-level adjustments to RCU configuration. By default,
no such adjustments can be made, which has the often-beneficial
side-effect of preventing "make oldconfig" from asking you all
sorts of detailed questions about how you would like numerous
obscure RCU options to be set up.
Say Y if you need to make expert-level adjustments to RCU.
Say N if you are unsure.
config [31mCONFIG_SRCU[0m
bool
help
This option selects the sleepable version of RCU. This version
permits arbitrary sleeping or blocking within RCU read-side critical
sections.
config [31mCONFIG_TINY_SRCU[0m
bool
default y if [31mCONFIG_SRCU[0m && [31mCONFIG_TINY_RCU[0m
help
This option selects the single-CPU non-preemptible version of [31mCONFIG_SRCU[0m.
config [31mCONFIG_TREE_SRCU[0m
bool
default y if [31mCONFIG_SRCU[0m && ![31mCONFIG_TINY_RCU[0m
help
This option selects the full-fledged version of [31mCONFIG_SRCU[0m.
config [31mCONFIG_TASKS_RCU[0m
def_bool [31mCONFIG_PREEMPTION[0m
select [31mCONFIG_SRCU[0m
help
This option enables a task-based RCU implementation that uses
only voluntary context switch (not preemption!), idle, and
user-mode execution as quiescent states.
config [31mCONFIG_RCU_STALL_COMMON[0m
def_bool ( [31mCONFIG_TREE_RCU[0m || [31mCONFIG_PREEMPT_RCU[0m )
help
This option enables RCU CPU stall code that is common between
the TINY and TREE variants of RCU. The purpose is to allow
the tiny variants to disable RCU CPU stall warnings, while
making these warnings mandatory for the tree variants.
config [31mCONFIG_RCU_NEED_SEGCBLIST[0m
def_bool ( [31mCONFIG_TREE_RCU[0m || [31mCONFIG_PREEMPT_RCU[0m || [31mCONFIG_TREE_SRCU[0m )
config [31mCONFIG_RCU_FANOUT[0m
int "Tree-based hierarchical RCU fanout value"
range 2 64 if [31mCONFIG_64BIT[0m
range 2 32 if ![31mCONFIG_64BIT[0m
depends on ([31mCONFIG_TREE_RCU[0m || [31mCONFIG_PREEMPT_RCU[0m) && [31mCONFIG_RCU_EXPERT[0m
default 64 if [31mCONFIG_64BIT[0m
default 32 if ![31mCONFIG_64BIT[0m
help
This option controls the fanout of hierarchical implementations
of RCU, allowing RCU to work efficiently on machines with
large numbers of CPUs. This value must be at least the fourth
root of [31mCONFIG_NR_CPUS[0m, which allows [31mCONFIG_NR_CPUS[0m to be insanely large.
The default value of [31mCONFIG_RCU_FANOUT[0m should be used for production
systems, but if you are stress-testing the RCU implementation
itself, small [31mCONFIG_RCU_FANOUT[0m values allow you to test large-system
code paths on small(er) systems.
Select a specific number if testing RCU itself.
Take the default if unsure.
config [31mCONFIG_RCU_FANOUT_LEAF[0m
int "Tree-based hierarchical RCU leaf-level fanout value"
range 2 64 if [31mCONFIG_64BIT[0m
range 2 32 if ![31mCONFIG_64BIT[0m
depends on ([31mCONFIG_TREE_RCU[0m || [31mCONFIG_PREEMPT_RCU[0m) && [31mCONFIG_RCU_EXPERT[0m
default 16
help
This option controls the leaf-level fanout of hierarchical
implementations of RCU, and allows trading off cache misses
against lock contention. Systems that synchronize their
scheduling-clock interrupts for energy-efficiency reasons will
want the default because the smaller leaf-level fanout keeps
lock contention levels acceptably low. Very large systems
(hundreds or thousands of CPUs) will instead want to set this
value to the maximum value possible in order to reduce the
number of cache misses incurred during RCU's grace-period
initialization. These systems tend to run CPU-bound, and thus
are not helped by synchronized interrupts, and thus tend to
skew them, which reduces lock contention enough that large
leaf-level fanouts work well. That said, setting leaf-level
fanout to a large number will likely cause problematic
lock contention on the leaf-level rcu_node structures unless
you boot with the skew_tick kernel parameter.
Select a specific number if testing RCU itself.
Select the maximum permissible value for large systems, but
please understand that you may also need to set the skew_tick
kernel boot parameter to avoid contention on the rcu_node
structure's locks.
Take the default if unsure.
config [31mCONFIG_RCU_FAST_NO_HZ[0m
bool "Accelerate last non-dyntick-idle CPU's grace periods"
depends on [31mCONFIG_NO_HZ_COMMON[0m && [31mCONFIG_SMP[0m && [31mCONFIG_RCU_EXPERT[0m
default n
help
This option permits CPUs to enter dynticks-idle state even if
they have RCU callbacks queued, and prevents RCU from waking
these CPUs up more than roughly once every four jiffies (by
default, you can adjust this using the rcutree.rcu_idle_gp_delay
parameter), thus improving energy efficiency. On the other
hand, this option increases the duration of RCU grace periods,
for example, slowing down synchronize_rcu().
Say Y if energy efficiency is critically important, and you
don't care about increased grace-period durations.
Say N if you are unsure.
config [31mCONFIG_RCU_BOOST[0m
bool "Enable RCU priority boosting"
depends on [31mCONFIG_RT_MUTEXES[0m && [31mCONFIG_PREEMPT_RCU[0m && [31mCONFIG_RCU_EXPERT[0m
default n
help
This option boosts the priority of preempted RCU readers that
block the current preemptible RCU grace period for too long.
This option also prevents heavy loads from blocking RCU
callback invocation.
Say Y here if you are working with real-time apps or heavy loads
Say N here if you are unsure.
config [31mCONFIG_RCU_BOOST_DELAY[0m
int "Milliseconds to delay boosting after RCU grace-period start"
range 0 3000
depends on [31mCONFIG_RCU_BOOST[0m
default 500
help
This option specifies the time to wait after the beginning of
a given grace period before priority-boosting preempted RCU
readers blocking that grace period. Note that any RCU reader
blocking an expedited RCU grace period is boosted immediately.
Accept the default if unsure.
config [31mCONFIG_RCU_NOCB_CPU[0m
bool "Offload RCU callback processing from boot-selected CPUs"
depends on [31mCONFIG_TREE_RCU[0m || [31mCONFIG_PREEMPT_RCU[0m
depends on [31mCONFIG_RCU_EXPERT[0m || [31mCONFIG_NO_HZ_FULL[0m
default n
help
Use this option to reduce OS jitter for aggressive HPC or
real-time workloads. It can also be used to offload RCU
callback invocation to energy-efficient CPUs in battery-powered
asymmetric multiprocessors.
This option offloads callback invocation from the set of CPUs
specified at boot time by the rcu_nocbs parameter. For each
such CPU, a kthread ("rcuox/N") will be created to invoke
callbacks, where the "N" is the CPU being offloaded, and where
the "p" for RCU-preempt ([31mCONFIG_PREEMPT[0m kernels) and "s" for RCU-sched
(![31mCONFIG_PREEMPT[0m kernels). Nothing prevents this kthread from running
on the specified CPUs, but (1) the kthreads may be preempted
between each callback, and (2) affinity or cgroups can be used
to force the kthreads to run on whatever set of CPUs is desired.
Say Y here if you want to help to debug reduced OS jitter.
Say N here if you are unsure.
endmenu # "RCU Subsystem"