1 # SPDX-License-Identifier: GPL-2.0-only
3 # RCU-related debugging configuration options
12 bool "RCU list lockdep debugging"
13 depends on PROVE_RCU && RCU_EXPERT
16 Enable RCU lockdep checking for list usages. By default it is
17 turned off since there are several list RCU users that still
18 need to be converted to pass a lockdep expression. To prevent
19 false-positive splats, we keep it default disabled but once all
20 users are converted, we can remove this config option.
27 tristate "performance tests for RCU"
28 depends on DEBUG_KERNEL
32 This option provides a kernel module that runs performance
33 tests on the RCU infrastructure. The kernel module may be built
34 after the fact on the running kernel to be tested, if desired.
36 Say Y here if you want RCU performance tests to be built into
38 Say M if you want the RCU performance tests to build as a module.
39 Say N if you are unsure.
41 config RCU_TORTURE_TEST
42 tristate "torture tests for RCU"
43 depends on DEBUG_KERNEL
47 This option provides a kernel module that runs torture tests
48 on the RCU infrastructure. The kernel module may be built
49 after the fact on the running kernel to be tested, if desired.
51 Say Y here if you want RCU torture tests to be built into
53 Say M if you want the RCU torture tests to build as a module.
54 Say N if you are unsure.
56 config RCU_REF_SCALE_TEST
57 tristate "Scalability tests for read-side synchronization (RCU and others)"
58 depends on DEBUG_KERNEL
62 This option provides a kernel module that runs performance tests
63 useful comparing RCU with various read-side synchronization mechanisms.
64 The kernel module may be built after the fact on the running kernel to be
67 Say Y here if you want these performance tests built into the kernel.
68 Say M if you want to build it as a module instead.
69 Say N if you are unsure.
71 config RCU_CPU_STALL_TIMEOUT
72 int "RCU CPU stall timeout in seconds"
73 depends on RCU_STALL_COMMON
77 If a given RCU grace period extends more than the specified
78 number of seconds, a CPU stall warning is printed. If the
79 RCU grace period persists, additional CPU stall warnings are
80 printed at more widely spaced intervals.
82 config RCU_EXP_CPU_STALL_TIMEOUT
83 int "Expedited RCU CPU stall timeout in milliseconds"
84 depends on RCU_STALL_COMMON
88 If a given expedited RCU grace period extends more than the
89 specified number of milliseconds, a CPU stall warning is printed.
90 If the RCU grace period persists, additional CPU stall warnings
91 are printed at more widely spaced intervals. A value of zero
92 says to use the RCU_CPU_STALL_TIMEOUT value converted from
93 seconds to milliseconds.
95 config RCU_CPU_STALL_CPUTIME
96 bool "Provide additional RCU stall debug information"
97 depends on RCU_STALL_COMMON
100 Collect statistics during the sampling period, such as the number of
101 (hard interrupts, soft interrupts, task switches) and the cputime of
102 (hard interrupts, soft interrupts, kernel tasks) are added to the
103 RCU stall report. For multiple continuous RCU stalls, all sampling
104 periods begin at half of the first RCU stall timeout.
105 The boot option rcupdate.rcu_cpu_stall_cputime has the same function
106 as this one, but will override this if it exists.
108 config RCU_CPU_STALL_NOTIFIER
109 bool "Provide RCU CPU-stall notifiers"
110 depends on RCU_STALL_COMMON
111 depends on DEBUG_KERNEL
112 depends on RCU_EXPERT
115 WARNING: You almost certainly do not want this!!!
117 Enable RCU CPU-stall notifiers, which are invoked just before
118 printing the RCU CPU stall warning. As such, bugs in notifier
119 callbacks can prevent stall warnings from being printed.
120 And the whole reason that a stall warning is being printed is
121 that something is hung up somewhere. Therefore, the notifier
122 callbacks must be written extremely carefully, preferably
123 containing only lockless code. After all, it is quite possible
124 that the whole reason that the RCU CPU stall is happening in
125 the first place is that someone forgot to release whatever lock
126 that you are thinking of acquiring. In which case, having your
127 notifier callback acquire that lock will hang, preventing the
128 RCU CPU stall warning from appearing.
130 Say Y here if you want RCU CPU stall notifiers (you don't want them)
131 Say N if you are unsure.
134 bool "Enable tracing for RCU"
135 depends on DEBUG_KERNEL
136 default y if TREE_RCU
139 This option enables additional tracepoints for ftrace-style
142 Say Y here if you want to enable RCU tracing
143 Say N if you are unsure.
146 bool "Provide debugging asserts for adding NO_HZ support to an arch"
147 depends on DEBUG_KERNEL
149 This option provides consistency checks in RCU's handling of
150 NO_HZ. These checks have proven quite helpful in detecting
151 bugs in arch-specific NO_HZ code.
153 Say N here if you need ultimate kernel/user switch latencies
154 Say Y if you are unsure
156 config RCU_STRICT_GRACE_PERIOD
157 bool "Provide debug RCU implementation with short grace periods"
158 depends on DEBUG_KERNEL && RCU_EXPERT && NR_CPUS <= 4 && !TINY_RCU
160 select PREEMPT_COUNT if PREEMPT=n
162 Select this option to build an RCU variant that is strict about
163 grace periods, making them as short as it can. This limits
164 scalability, destroys real-time response, degrades battery
165 lifetime and kills performance. Don't try this on large
166 machines, as in systems with more than about 10 or 20 CPUs.
167 But in conjunction with tools like KASAN, it can be helpful
168 when looking for certain types of RCU usage bugs, for example,
169 too-short RCU read-side critical sections.
171 endmenu # "RCU Debugging"