Skip to content

Commit 0af92d4

Browse files
committed
rcu: Move RCU non-debug Kconfig options to kernel/rcu
RCU's Kconfig options are scattered, and there are enough of them that it would be good for them to be more centralized. This commit therefore extracts RCU's Kconfig options from init/Kconfig into a new kernel/rcu/Kconfig file. Reported-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
1 parent 44c65ff commit 0af92d4

2 files changed

Lines changed: 243 additions & 238 deletions

File tree

‎init/Kconfig‎

Lines changed: 1 addition & 238 deletions
Original file line numberDiff line numberDiff line change
@@ -472,244 +472,7 @@ config TASK_IO_ACCOUNTING
472472

473473
endmenu # "CPU/Task time and stats accounting"
474474

475-
menu "RCU Subsystem"
476-
477-
config TREE_RCU
478-
bool
479-
default y if !PREEMPT && SMP
480-
help
481-
This option selects the RCU implementation that is
482-
designed for very large SMP system with hundreds or
483-
thousands of CPUs. It also scales down nicely to
484-
smaller systems.
485-
486-
config PREEMPT_RCU
487-
bool
488-
default y if PREEMPT
489-
help
490-
This option selects the RCU implementation that is
491-
designed for very large SMP systems with hundreds or
492-
thousands of CPUs, but for which real-time response
493-
is also required. It also scales down nicely to
494-
smaller systems.
495-
496-
Select this option if you are unsure.
497-
498-
config TINY_RCU
499-
bool
500-
default y if !PREEMPT && !SMP
501-
help
502-
This option selects the RCU implementation that is
503-
designed for UP systems from which real-time response
504-
is not required. This option greatly reduces the
505-
memory footprint of RCU.
506-
507-
config RCU_EXPERT
508-
bool "Make expert-level adjustments to RCU configuration"
509-
default n
510-
help
511-
This option needs to be enabled if you wish to make
512-
expert-level adjustments to RCU configuration. By default,
513-
no such adjustments can be made, which has the often-beneficial
514-
side-effect of preventing "make oldconfig" from asking you all
515-
sorts of detailed questions about how you would like numerous
516-
obscure RCU options to be set up.
517-
518-
Say Y if you need to make expert-level adjustments to RCU.
519-
520-
Say N if you are unsure.
521-
522-
config SRCU
523-
bool
524-
help
525-
This option selects the sleepable version of RCU. This version
526-
permits arbitrary sleeping or blocking within RCU read-side critical
527-
sections.
528-
529-
config TINY_SRCU
530-
bool
531-
default y if SRCU && TINY_RCU
532-
help
533-
This option selects the single-CPU non-preemptible version of SRCU.
534-
535-
config TREE_SRCU
536-
bool
537-
default y if SRCU && !TINY_RCU
538-
help
539-
This option selects the full-fledged version of SRCU.
540-
541-
config TASKS_RCU
542-
bool
543-
default n
544-
select SRCU
545-
help
546-
This option enables a task-based RCU implementation that uses
547-
only voluntary context switch (not preemption!), idle, and
548-
user-mode execution as quiescent states.
549-
550-
config RCU_STALL_COMMON
551-
def_bool ( TREE_RCU || PREEMPT_RCU || RCU_TRACE )
552-
help
553-
This option enables RCU CPU stall code that is common between
554-
the TINY and TREE variants of RCU. The purpose is to allow
555-
the tiny variants to disable RCU CPU stall warnings, while
556-
making these warnings mandatory for the tree variants.
557-
558-
config RCU_NEED_SEGCBLIST
559-
def_bool ( TREE_RCU || PREEMPT_RCU || TREE_SRCU )
560-
561-
config CONTEXT_TRACKING
562-
bool
563-
564-
config CONTEXT_TRACKING_FORCE
565-
bool "Force context tracking"
566-
depends on CONTEXT_TRACKING
567-
default y if !NO_HZ_FULL
568-
help
569-
The major pre-requirement for full dynticks to work is to
570-
support the context tracking subsystem. But there are also
571-
other dependencies to provide in order to make the full
572-
dynticks working.
573-
574-
This option stands for testing when an arch implements the
575-
context tracking backend but doesn't yet fullfill all the
576-
requirements to make the full dynticks feature working.
577-
Without the full dynticks, there is no way to test the support
578-
for context tracking and the subsystems that rely on it: RCU
579-
userspace extended quiescent state and tickless cputime
580-
accounting. This option copes with the absence of the full
581-
dynticks subsystem by forcing the context tracking on all
582-
CPUs in the system.
583-
584-
Say Y only if you're working on the development of an
585-
architecture backend for the context tracking.
586-
587-
Say N otherwise, this option brings an overhead that you
588-
don't want in production.
589-
590-
591-
config RCU_FANOUT
592-
int "Tree-based hierarchical RCU fanout value"
593-
range 2 64 if 64BIT
594-
range 2 32 if !64BIT
595-
depends on (TREE_RCU || PREEMPT_RCU) && RCU_EXPERT
596-
default 64 if 64BIT
597-
default 32 if !64BIT
598-
help
599-
This option controls the fanout of hierarchical implementations
600-
of RCU, allowing RCU to work efficiently on machines with
601-
large numbers of CPUs. This value must be at least the fourth
602-
root of NR_CPUS, which allows NR_CPUS to be insanely large.
603-
The default value of RCU_FANOUT should be used for production
604-
systems, but if you are stress-testing the RCU implementation
605-
itself, small RCU_FANOUT values allow you to test large-system
606-
code paths on small(er) systems.
607-
608-
Select a specific number if testing RCU itself.
609-
Take the default if unsure.
610-
611-
config RCU_FANOUT_LEAF
612-
int "Tree-based hierarchical RCU leaf-level fanout value"
613-
range 2 64 if 64BIT
614-
range 2 32 if !64BIT
615-
depends on (TREE_RCU || PREEMPT_RCU) && RCU_EXPERT
616-
default 16
617-
help
618-
This option controls the leaf-level fanout of hierarchical
619-
implementations of RCU, and allows trading off cache misses
620-
against lock contention. Systems that synchronize their
621-
scheduling-clock interrupts for energy-efficiency reasons will
622-
want the default because the smaller leaf-level fanout keeps
623-
lock contention levels acceptably low. Very large systems
624-
(hundreds or thousands of CPUs) will instead want to set this
625-
value to the maximum value possible in order to reduce the
626-
number of cache misses incurred during RCU's grace-period
627-
initialization. These systems tend to run CPU-bound, and thus
628-
are not helped by synchronized interrupts, and thus tend to
629-
skew them, which reduces lock contention enough that large
630-
leaf-level fanouts work well. That said, setting leaf-level
631-
fanout to a large number will likely cause problematic
632-
lock contention on the leaf-level rcu_node structures unless
633-
you boot with the skew_tick kernel parameter.
634-
635-
Select a specific number if testing RCU itself.
636-
637-
Select the maximum permissible value for large systems, but
638-
please understand that you may also need to set the skew_tick
639-
kernel boot parameter to avoid contention on the rcu_node
640-
structure's locks.
641-
642-
Take the default if unsure.
643-
644-
config RCU_FAST_NO_HZ
645-
bool "Accelerate last non-dyntick-idle CPU's grace periods"
646-
depends on NO_HZ_COMMON && SMP && RCU_EXPERT
647-
default n
648-
help
649-
This option permits CPUs to enter dynticks-idle state even if
650-
they have RCU callbacks queued, and prevents RCU from waking
651-
these CPUs up more than roughly once every four jiffies (by
652-
default, you can adjust this using the rcutree.rcu_idle_gp_delay
653-
parameter), thus improving energy efficiency. On the other
654-
hand, this option increases the duration of RCU grace periods,
655-
for example, slowing down synchronize_rcu().
656-
657-
Say Y if energy efficiency is critically important, and you
658-
don't care about increased grace-period durations.
659-
660-
Say N if you are unsure.
661-
662-
config RCU_BOOST
663-
bool "Enable RCU priority boosting"
664-
depends on RT_MUTEXES && PREEMPT_RCU && RCU_EXPERT
665-
default n
666-
help
667-
This option boosts the priority of preempted RCU readers that
668-
block the current preemptible RCU grace period for too long.
669-
This option also prevents heavy loads from blocking RCU
670-
callback invocation for all flavors of RCU.
671-
672-
Say Y here if you are working with real-time apps or heavy loads
673-
Say N here if you are unsure.
674-
675-
config RCU_BOOST_DELAY
676-
int "Milliseconds to delay boosting after RCU grace-period start"
677-
range 0 3000
678-
depends on RCU_BOOST
679-
default 500
680-
help
681-
This option specifies the time to wait after the beginning of
682-
a given grace period before priority-boosting preempted RCU
683-
readers blocking that grace period. Note that any RCU reader
684-
blocking an expedited RCU grace period is boosted immediately.
685-
686-
Accept the default if unsure.
687-
688-
config RCU_NOCB_CPU
689-
bool "Offload RCU callback processing from boot-selected CPUs"
690-
depends on TREE_RCU || PREEMPT_RCU
691-
depends on RCU_EXPERT || NO_HZ_FULL
692-
default n
693-
help
694-
Use this option to reduce OS jitter for aggressive HPC or
695-
real-time workloads. It can also be used to offload RCU
696-
callback invocation to energy-efficient CPUs in battery-powered
697-
asymmetric multiprocessors.
698-
699-
This option offloads callback invocation from the set of
700-
CPUs specified at boot time by the rcu_nocbs parameter.
701-
For each such CPU, a kthread ("rcuox/N") will be created to
702-
invoke callbacks, where the "N" is the CPU being offloaded,
703-
and where the "x" is "b" for RCU-bh, "p" for RCU-preempt, and
704-
"s" for RCU-sched. Nothing prevents this kthread from running
705-
on the specified CPUs, but (1) the kthreads may be preempted
706-
between each callback, and (2) affinity or cgroups can be used
707-
to force the kthreads to run on whatever set of CPUs is desired.
708-
709-
Say Y here if you want to help to debug reduced OS jitter.
710-
Say N here if you are unsure.
711-
712-
endmenu # "RCU Subsystem"
475+
source "kernel/rcu/Kconfig"
713476

714477
config BUILD_BIN2C
715478
bool

0 commit comments

Comments
 (0)