Thomas Gleixner | ec8f24b | 2019-05-19 13:07:45 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
Paul E. McKenney | 0af92d4 | 2017-05-17 08:43:40 -0700 | [diff] [blame] | 2 | # |
| 3 | # RCU-related configuration options |
| 4 | # |
| 5 | |
| 6 | menu "RCU Subsystem" |
| 7 | |
| 8 | config TREE_RCU |
| 9 | bool |
Thomas Gleixner | 01b1d88 | 2019-07-26 23:19:38 +0200 | [diff] [blame] | 10 | default y if !PREEMPTION && SMP |
Paul E. McKenney | 0af92d4 | 2017-05-17 08:43:40 -0700 | [diff] [blame] | 11 | help |
| 12 | This option selects the RCU implementation that is |
| 13 | designed for very large SMP system with hundreds or |
| 14 | thousands of CPUs. It also scales down nicely to |
| 15 | smaller systems. |
| 16 | |
| 17 | config PREEMPT_RCU |
| 18 | bool |
Thomas Gleixner | 01b1d88 | 2019-07-26 23:19:38 +0200 | [diff] [blame] | 19 | default y if PREEMPTION |
Paul E. McKenney | 0af92d4 | 2017-05-17 08:43:40 -0700 | [diff] [blame] | 20 | help |
| 21 | This option selects the RCU implementation that is |
| 22 | designed for very large SMP systems with hundreds or |
| 23 | thousands of CPUs, but for which real-time response |
| 24 | is also required. It also scales down nicely to |
| 25 | smaller systems. |
| 26 | |
| 27 | Select this option if you are unsure. |
| 28 | |
| 29 | config TINY_RCU |
| 30 | bool |
Thomas Gleixner | 01b1d88 | 2019-07-26 23:19:38 +0200 | [diff] [blame] | 31 | default y if !PREEMPTION && !SMP |
Paul E. McKenney | 0af92d4 | 2017-05-17 08:43:40 -0700 | [diff] [blame] | 32 | help |
| 33 | This option selects the RCU implementation that is |
| 34 | designed for UP systems from which real-time response |
| 35 | is not required. This option greatly reduces the |
| 36 | memory footprint of RCU. |
| 37 | |
| 38 | config RCU_EXPERT |
| 39 | bool "Make expert-level adjustments to RCU configuration" |
| 40 | default n |
| 41 | help |
| 42 | This option needs to be enabled if you wish to make |
| 43 | expert-level adjustments to RCU configuration. By default, |
| 44 | no such adjustments can be made, which has the often-beneficial |
| 45 | side-effect of preventing "make oldconfig" from asking you all |
| 46 | sorts of detailed questions about how you would like numerous |
| 47 | obscure RCU options to be set up. |
| 48 | |
| 49 | Say Y if you need to make expert-level adjustments to RCU. |
| 50 | |
| 51 | Say N if you are unsure. |
| 52 | |
| 53 | config SRCU |
| 54 | bool |
| 55 | help |
| 56 | This option selects the sleepable version of RCU. This version |
| 57 | permits arbitrary sleeping or blocking within RCU read-side critical |
| 58 | sections. |
| 59 | |
| 60 | config TINY_SRCU |
| 61 | bool |
| 62 | default y if SRCU && TINY_RCU |
| 63 | help |
| 64 | This option selects the single-CPU non-preemptible version of SRCU. |
| 65 | |
| 66 | config TREE_SRCU |
| 67 | bool |
| 68 | default y if SRCU && !TINY_RCU |
| 69 | help |
| 70 | This option selects the full-fledged version of SRCU. |
| 71 | |
| 72 | config TASKS_RCU |
Thomas Gleixner | 01b1d88 | 2019-07-26 23:19:38 +0200 | [diff] [blame] | 73 | def_bool PREEMPTION |
Paul E. McKenney | 0af92d4 | 2017-05-17 08:43:40 -0700 | [diff] [blame] | 74 | select SRCU |
| 75 | help |
| 76 | This option enables a task-based RCU implementation that uses |
| 77 | only voluntary context switch (not preemption!), idle, and |
| 78 | user-mode execution as quiescent states. |
| 79 | |
| 80 | config RCU_STALL_COMMON |
Paul E. McKenney | 6d48152 | 2017-05-17 10:54:29 -0700 | [diff] [blame] | 81 | def_bool ( TREE_RCU || PREEMPT_RCU ) |
Paul E. McKenney | 0af92d4 | 2017-05-17 08:43:40 -0700 | [diff] [blame] | 82 | help |
| 83 | This option enables RCU CPU stall code that is common between |
| 84 | the TINY and TREE variants of RCU. The purpose is to allow |
| 85 | the tiny variants to disable RCU CPU stall warnings, while |
| 86 | making these warnings mandatory for the tree variants. |
| 87 | |
| 88 | config RCU_NEED_SEGCBLIST |
| 89 | def_bool ( TREE_RCU || PREEMPT_RCU || TREE_SRCU ) |
| 90 | |
Paul E. McKenney | 0af92d4 | 2017-05-17 08:43:40 -0700 | [diff] [blame] | 91 | config RCU_FANOUT |
| 92 | int "Tree-based hierarchical RCU fanout value" |
| 93 | range 2 64 if 64BIT |
| 94 | range 2 32 if !64BIT |
| 95 | depends on (TREE_RCU || PREEMPT_RCU) && RCU_EXPERT |
| 96 | default 64 if 64BIT |
| 97 | default 32 if !64BIT |
| 98 | help |
| 99 | This option controls the fanout of hierarchical implementations |
| 100 | of RCU, allowing RCU to work efficiently on machines with |
| 101 | large numbers of CPUs. This value must be at least the fourth |
| 102 | root of NR_CPUS, which allows NR_CPUS to be insanely large. |
| 103 | The default value of RCU_FANOUT should be used for production |
| 104 | systems, but if you are stress-testing the RCU implementation |
| 105 | itself, small RCU_FANOUT values allow you to test large-system |
| 106 | code paths on small(er) systems. |
| 107 | |
| 108 | Select a specific number if testing RCU itself. |
| 109 | Take the default if unsure. |
| 110 | |
| 111 | config RCU_FANOUT_LEAF |
| 112 | int "Tree-based hierarchical RCU leaf-level fanout value" |
| 113 | range 2 64 if 64BIT |
| 114 | range 2 32 if !64BIT |
| 115 | depends on (TREE_RCU || PREEMPT_RCU) && RCU_EXPERT |
| 116 | default 16 |
| 117 | help |
| 118 | This option controls the leaf-level fanout of hierarchical |
| 119 | implementations of RCU, and allows trading off cache misses |
| 120 | against lock contention. Systems that synchronize their |
| 121 | scheduling-clock interrupts for energy-efficiency reasons will |
| 122 | want the default because the smaller leaf-level fanout keeps |
| 123 | lock contention levels acceptably low. Very large systems |
| 124 | (hundreds or thousands of CPUs) will instead want to set this |
| 125 | value to the maximum value possible in order to reduce the |
| 126 | number of cache misses incurred during RCU's grace-period |
| 127 | initialization. These systems tend to run CPU-bound, and thus |
| 128 | are not helped by synchronized interrupts, and thus tend to |
| 129 | skew them, which reduces lock contention enough that large |
| 130 | leaf-level fanouts work well. That said, setting leaf-level |
| 131 | fanout to a large number will likely cause problematic |
| 132 | lock contention on the leaf-level rcu_node structures unless |
| 133 | you boot with the skew_tick kernel parameter. |
| 134 | |
| 135 | Select a specific number if testing RCU itself. |
| 136 | |
| 137 | Select the maximum permissible value for large systems, but |
| 138 | please understand that you may also need to set the skew_tick |
| 139 | kernel boot parameter to avoid contention on the rcu_node |
| 140 | structure's locks. |
| 141 | |
| 142 | Take the default if unsure. |
| 143 | |
| 144 | config RCU_FAST_NO_HZ |
| 145 | bool "Accelerate last non-dyntick-idle CPU's grace periods" |
| 146 | depends on NO_HZ_COMMON && SMP && RCU_EXPERT |
| 147 | default n |
| 148 | help |
| 149 | This option permits CPUs to enter dynticks-idle state even if |
| 150 | they have RCU callbacks queued, and prevents RCU from waking |
| 151 | these CPUs up more than roughly once every four jiffies (by |
| 152 | default, you can adjust this using the rcutree.rcu_idle_gp_delay |
| 153 | parameter), thus improving energy efficiency. On the other |
| 154 | hand, this option increases the duration of RCU grace periods, |
| 155 | for example, slowing down synchronize_rcu(). |
| 156 | |
| 157 | Say Y if energy efficiency is critically important, and you |
| 158 | don't care about increased grace-period durations. |
| 159 | |
| 160 | Say N if you are unsure. |
| 161 | |
| 162 | config RCU_BOOST |
| 163 | bool "Enable RCU priority boosting" |
| 164 | depends on RT_MUTEXES && PREEMPT_RCU && RCU_EXPERT |
| 165 | default n |
| 166 | help |
| 167 | This option boosts the priority of preempted RCU readers that |
| 168 | block the current preemptible RCU grace period for too long. |
| 169 | This option also prevents heavy loads from blocking RCU |
Paul E. McKenney | 8c1cf2d | 2018-07-07 18:12:26 -0700 | [diff] [blame] | 170 | callback invocation. |
Paul E. McKenney | 0af92d4 | 2017-05-17 08:43:40 -0700 | [diff] [blame] | 171 | |
| 172 | Say Y here if you are working with real-time apps or heavy loads |
| 173 | Say N here if you are unsure. |
| 174 | |
| 175 | config RCU_BOOST_DELAY |
| 176 | int "Milliseconds to delay boosting after RCU grace-period start" |
| 177 | range 0 3000 |
| 178 | depends on RCU_BOOST |
| 179 | default 500 |
| 180 | help |
| 181 | This option specifies the time to wait after the beginning of |
| 182 | a given grace period before priority-boosting preempted RCU |
| 183 | readers blocking that grace period. Note that any RCU reader |
| 184 | blocking an expedited RCU grace period is boosted immediately. |
| 185 | |
| 186 | Accept the default if unsure. |
| 187 | |
| 188 | config RCU_NOCB_CPU |
| 189 | bool "Offload RCU callback processing from boot-selected CPUs" |
| 190 | depends on TREE_RCU || PREEMPT_RCU |
| 191 | depends on RCU_EXPERT || NO_HZ_FULL |
| 192 | default n |
| 193 | help |
| 194 | Use this option to reduce OS jitter for aggressive HPC or |
| 195 | real-time workloads. It can also be used to offload RCU |
| 196 | callback invocation to energy-efficient CPUs in battery-powered |
| 197 | asymmetric multiprocessors. |
| 198 | |
Paul E. McKenney | 8c1cf2d | 2018-07-07 18:12:26 -0700 | [diff] [blame] | 199 | This option offloads callback invocation from the set of CPUs |
| 200 | specified at boot time by the rcu_nocbs parameter. For each |
| 201 | such CPU, a kthread ("rcuox/N") will be created to invoke |
| 202 | callbacks, where the "N" is the CPU being offloaded, and where |
| 203 | the "p" for RCU-preempt (PREEMPT kernels) and "s" for RCU-sched |
| 204 | (!PREEMPT kernels). Nothing prevents this kthread from running |
| 205 | on the specified CPUs, but (1) the kthreads may be preempted |
| 206 | between each callback, and (2) affinity or cgroups can be used |
| 207 | to force the kthreads to run on whatever set of CPUs is desired. |
Paul E. McKenney | 0af92d4 | 2017-05-17 08:43:40 -0700 | [diff] [blame] | 208 | |
| 209 | Say Y here if you want to help to debug reduced OS jitter. |
| 210 | Say N here if you are unsure. |
| 211 | |
| 212 | endmenu # "RCU Subsystem" |