| .. | .. |
|---|
| 1 | +# SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | # |
|---|
| 2 | 3 | # RCU-related configuration options |
|---|
| 3 | 4 | # |
|---|
| .. | .. |
|---|
| 6 | 7 | |
|---|
| 7 | 8 | config TREE_RCU |
|---|
| 8 | 9 | bool |
|---|
| 9 | | - default y if !PREEMPT && SMP |
|---|
| 10 | + default y if SMP |
|---|
| 10 | 11 | help |
|---|
| 11 | 12 | This option selects the RCU implementation that is |
|---|
| 12 | 13 | designed for very large SMP system with hundreds or |
|---|
| .. | .. |
|---|
| 15 | 16 | |
|---|
| 16 | 17 | config PREEMPT_RCU |
|---|
| 17 | 18 | bool |
|---|
| 18 | | - default y if PREEMPT |
|---|
| 19 | + default y if PREEMPTION |
|---|
| 20 | + select TREE_RCU |
|---|
| 19 | 21 | help |
|---|
| 20 | 22 | This option selects the RCU implementation that is |
|---|
| 21 | 23 | designed for very large SMP systems with hundreds or |
|---|
| .. | .. |
|---|
| 27 | 29 | |
|---|
| 28 | 30 | config TINY_RCU |
|---|
| 29 | 31 | bool |
|---|
| 30 | | - default y if !PREEMPT && !SMP |
|---|
| 32 | + default y if !PREEMPTION && !SMP |
|---|
| 31 | 33 | help |
|---|
| 32 | 34 | This option selects the RCU implementation that is |
|---|
| 33 | 35 | designed for UP systems from which real-time response |
|---|
| .. | .. |
|---|
| 68 | 70 | help |
|---|
| 69 | 71 | This option selects the full-fledged version of SRCU. |
|---|
| 70 | 72 | |
|---|
| 71 | | -config TASKS_RCU |
|---|
| 72 | | - def_bool PREEMPT |
|---|
| 73 | +config TASKS_RCU_GENERIC |
|---|
| 74 | + def_bool TASKS_RCU || TASKS_RUDE_RCU || TASKS_TRACE_RCU |
|---|
| 73 | 75 | select SRCU |
|---|
| 76 | + help |
|---|
| 77 | + This option enables generic infrastructure code supporting |
|---|
| 78 | + task-based RCU implementations. Not for manual selection. |
|---|
| 79 | + |
|---|
| 80 | +config TASKS_RCU |
|---|
| 81 | + def_bool PREEMPTION |
|---|
| 74 | 82 | help |
|---|
| 75 | 83 | This option enables a task-based RCU implementation that uses |
|---|
| 76 | 84 | only voluntary context switch (not preemption!), idle, and |
|---|
| 77 | | - user-mode execution as quiescent states. |
|---|
| 85 | + user-mode execution as quiescent states. Not for manual selection. |
|---|
| 86 | + |
|---|
| 87 | +config TASKS_RUDE_RCU |
|---|
| 88 | + def_bool 0 |
|---|
| 89 | + select IRQ_WORK |
|---|
| 90 | + help |
|---|
| 91 | + This option enables a task-based RCU implementation that uses |
|---|
| 92 | + only context switch (including preemption) and user-mode |
|---|
| 93 | + execution as quiescent states. It forces IPIs and context |
|---|
| 94 | + switches on all online CPUs, including idle ones, so use |
|---|
| 95 | + with caution. |
|---|
| 96 | + |
|---|
| 97 | +config TASKS_TRACE_RCU |
|---|
| 98 | + def_bool 0 |
|---|
| 99 | + help |
|---|
| 100 | + This option enables a task-based RCU implementation that uses |
|---|
| 101 | + explicit rcu_read_lock_trace() read-side markers, and allows |
|---|
| 102 | + these readers to appear in the idle loop as well as on the CPU |
|---|
| 103 | + hotplug code paths. It can force IPIs on online CPUs, including |
|---|
| 104 | + idle ones, so use with caution. |
|---|
| 78 | 105 | |
|---|
| 79 | 106 | config RCU_STALL_COMMON |
|---|
| 80 | | - def_bool ( TREE_RCU || PREEMPT_RCU ) |
|---|
| 107 | + def_bool TREE_RCU |
|---|
| 81 | 108 | help |
|---|
| 82 | 109 | This option enables RCU CPU stall code that is common between |
|---|
| 83 | 110 | the TINY and TREE variants of RCU. The purpose is to allow |
|---|
| .. | .. |
|---|
| 85 | 112 | making these warnings mandatory for the tree variants. |
|---|
| 86 | 113 | |
|---|
| 87 | 114 | config RCU_NEED_SEGCBLIST |
|---|
| 88 | | - def_bool ( TREE_RCU || PREEMPT_RCU || TREE_SRCU ) |
|---|
| 89 | | - |
|---|
| 90 | | -config CONTEXT_TRACKING |
|---|
| 91 | | - bool |
|---|
| 92 | | - |
|---|
| 93 | | -config CONTEXT_TRACKING_FORCE |
|---|
| 94 | | - bool "Force context tracking" |
|---|
| 95 | | - depends on CONTEXT_TRACKING |
|---|
| 96 | | - default y if !NO_HZ_FULL |
|---|
| 97 | | - help |
|---|
| 98 | | - The major pre-requirement for full dynticks to work is to |
|---|
| 99 | | - support the context tracking subsystem. But there are also |
|---|
| 100 | | - other dependencies to provide in order to make the full |
|---|
| 101 | | - dynticks working. |
|---|
| 102 | | - |
|---|
| 103 | | - This option stands for testing when an arch implements the |
|---|
| 104 | | - context tracking backend but doesn't yet fullfill all the |
|---|
| 105 | | - requirements to make the full dynticks feature working. |
|---|
| 106 | | - Without the full dynticks, there is no way to test the support |
|---|
| 107 | | - for context tracking and the subsystems that rely on it: RCU |
|---|
| 108 | | - userspace extended quiescent state and tickless cputime |
|---|
| 109 | | - accounting. This option copes with the absence of the full |
|---|
| 110 | | - dynticks subsystem by forcing the context tracking on all |
|---|
| 111 | | - CPUs in the system. |
|---|
| 112 | | - |
|---|
| 113 | | - Say Y only if you're working on the development of an |
|---|
| 114 | | - architecture backend for the context tracking. |
|---|
| 115 | | - |
|---|
| 116 | | - Say N otherwise, this option brings an overhead that you |
|---|
| 117 | | - don't want in production. |
|---|
| 118 | | - |
|---|
| 115 | + def_bool ( TREE_RCU || TREE_SRCU ) |
|---|
| 119 | 116 | |
|---|
| 120 | 117 | config RCU_FANOUT |
|---|
| 121 | 118 | int "Tree-based hierarchical RCU fanout value" |
|---|
| 122 | 119 | range 2 64 if 64BIT |
|---|
| 123 | 120 | range 2 32 if !64BIT |
|---|
| 124 | | - depends on (TREE_RCU || PREEMPT_RCU) && RCU_EXPERT |
|---|
| 121 | + depends on TREE_RCU && RCU_EXPERT |
|---|
| 125 | 122 | default 64 if 64BIT |
|---|
| 126 | 123 | default 32 if !64BIT |
|---|
| 127 | 124 | help |
|---|
| .. | .. |
|---|
| 139 | 136 | |
|---|
| 140 | 137 | config RCU_FANOUT_LEAF |
|---|
| 141 | 138 | int "Tree-based hierarchical RCU leaf-level fanout value" |
|---|
| 142 | | - range 2 64 if 64BIT |
|---|
| 143 | | - range 2 32 if !64BIT |
|---|
| 144 | | - depends on (TREE_RCU || PREEMPT_RCU) && RCU_EXPERT |
|---|
| 145 | | - default 16 |
|---|
| 139 | + range 2 64 if 64BIT && !RCU_STRICT_GRACE_PERIOD |
|---|
| 140 | + range 2 32 if !64BIT && !RCU_STRICT_GRACE_PERIOD |
|---|
| 141 | + range 2 3 if RCU_STRICT_GRACE_PERIOD |
|---|
| 142 | + depends on TREE_RCU && RCU_EXPERT |
|---|
| 143 | + default 16 if !RCU_STRICT_GRACE_PERIOD |
|---|
| 144 | + default 2 if RCU_STRICT_GRACE_PERIOD |
|---|
| 146 | 145 | help |
|---|
| 147 | 146 | This option controls the leaf-level fanout of hierarchical |
|---|
| 148 | 147 | implementations of RCU, and allows trading off cache misses |
|---|
| .. | .. |
|---|
| 172 | 171 | |
|---|
| 173 | 172 | config RCU_FAST_NO_HZ |
|---|
| 174 | 173 | bool "Accelerate last non-dyntick-idle CPU's grace periods" |
|---|
| 175 | | - depends on NO_HZ_COMMON && SMP && RCU_EXPERT && !PREEMPT_RT_FULL |
|---|
| 174 | + depends on NO_HZ_COMMON && SMP && RCU_EXPERT |
|---|
| 176 | 175 | default n |
|---|
| 177 | 176 | help |
|---|
| 178 | 177 | This option permits CPUs to enter dynticks-idle state even if |
|---|
| .. | .. |
|---|
| 190 | 189 | |
|---|
| 191 | 190 | config RCU_BOOST |
|---|
| 192 | 191 | bool "Enable RCU priority boosting" |
|---|
| 193 | | - depends on (RT_MUTEXES && PREEMPT_RCU && RCU_EXPERT) || PREEMPT_RT_FULL |
|---|
| 194 | | - default y if PREEMPT_RT_FULL |
|---|
| 192 | + depends on (RT_MUTEXES && PREEMPT_RCU && RCU_EXPERT) || PREEMPT_RT |
|---|
| 193 | + default y if PREEMPT_RT |
|---|
| 195 | 194 | help |
|---|
| 196 | 195 | This option boosts the priority of preempted RCU readers that |
|---|
| 197 | 196 | block the current preemptible RCU grace period for too long. |
|---|
| 198 | 197 | This option also prevents heavy loads from blocking RCU |
|---|
| 199 | | - callback invocation for all flavors of RCU. |
|---|
| 198 | + callback invocation. |
|---|
| 200 | 199 | |
|---|
| 201 | 200 | Say Y here if you are working with real-time apps or heavy loads |
|---|
| 202 | 201 | Say N here if you are unsure. |
|---|
| .. | .. |
|---|
| 216 | 215 | |
|---|
| 217 | 216 | config RCU_NOCB_CPU |
|---|
| 218 | 217 | bool "Offload RCU callback processing from boot-selected CPUs" |
|---|
| 219 | | - depends on TREE_RCU || PREEMPT_RCU |
|---|
| 218 | + depends on TREE_RCU |
|---|
| 220 | 219 | depends on RCU_EXPERT || NO_HZ_FULL |
|---|
| 221 | 220 | default n |
|---|
| 222 | 221 | help |
|---|
| .. | .. |
|---|
| 225 | 224 | callback invocation to energy-efficient CPUs in battery-powered |
|---|
| 226 | 225 | asymmetric multiprocessors. |
|---|
| 227 | 226 | |
|---|
| 228 | | - This option offloads callback invocation from the set of |
|---|
| 229 | | - CPUs specified at boot time by the rcu_nocbs parameter. |
|---|
| 230 | | - For each such CPU, a kthread ("rcuox/N") will be created to |
|---|
| 231 | | - invoke callbacks, where the "N" is the CPU being offloaded, |
|---|
| 232 | | - and where the "x" is "b" for RCU-bh, "p" for RCU-preempt, and |
|---|
| 233 | | - "s" for RCU-sched. Nothing prevents this kthread from running |
|---|
| 227 | + This option offloads callback invocation from the set of CPUs |
|---|
| 228 | + specified at boot time by the rcu_nocbs parameter. For each |
|---|
| 229 | + such CPU, a kthread ("rcuox/N") will be created to invoke |
|---|
| 230 | + callbacks, where the "N" is the CPU being offloaded, and where |
|---|
| 231 | + the "p" for RCU-preempt (PREEMPTION kernels) and "s" for RCU-sched |
|---|
| 232 | + (!PREEMPTION kernels). Nothing prevents this kthread from running |
|---|
| 234 | 233 | on the specified CPUs, but (1) the kthreads may be preempted |
|---|
| 235 | 234 | between each callback, and (2) affinity or cgroups can be used |
|---|
| 236 | 235 | to force the kthreads to run on whatever set of CPUs is desired. |
|---|
| .. | .. |
|---|
| 238 | 237 | Say Y here if you want to help to debug reduced OS jitter. |
|---|
| 239 | 238 | Say N here if you are unsure. |
|---|
| 240 | 239 | |
|---|
| 240 | +config TASKS_TRACE_RCU_READ_MB |
|---|
| 241 | + bool "Tasks Trace RCU readers use memory barriers in user and idle" |
|---|
| 242 | + depends on RCU_EXPERT |
|---|
| 243 | + default PREEMPT_RT || NR_CPUS < 8 |
|---|
| 244 | + help |
|---|
| 245 | + Use this option to further reduce the number of IPIs sent |
|---|
| 246 | + to CPUs executing in userspace or idle during tasks trace |
|---|
| 247 | + RCU grace periods. Given that a reasonable setting of |
|---|
| 248 | + the rcupdate.rcu_task_ipi_delay kernel boot parameter |
|---|
| 249 | + eliminates such IPIs for many workloads, proper setting |
|---|
| 250 | + of this Kconfig option is important mostly for aggressive |
|---|
| 251 | + real-time installations and for battery-powered devices, |
|---|
| 252 | + hence the default chosen above. |
|---|
| 253 | + |
|---|
| 254 | + Say Y here if you hate IPIs. |
|---|
| 255 | + Say N here if you hate read-side memory barriers. |
|---|
| 256 | + Take the default if you are unsure. |
|---|
| 257 | + |
|---|
| 241 | 258 | endmenu # "RCU Subsystem" |
|---|