xref: /openbmc/linux/kernel/rcu/Kconfig.debug (revision 3ce7547e)
1# SPDX-License-Identifier: GPL-2.0-only
2#
3# RCU-related debugging configuration options
4#
5
6menu "RCU Debugging"
7
8config PROVE_RCU
9	def_bool PROVE_LOCKING
10
11config PROVE_RCU_LIST
12	bool "RCU list lockdep debugging"
13	depends on PROVE_RCU && RCU_EXPERT
14	default n
15	help
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.
21
22config TORTURE_TEST
23	tristate
24	default n
25
26config RCU_SCALE_TEST
27	tristate "performance tests for RCU"
28	depends on DEBUG_KERNEL
29	select TORTURE_TEST
30	select SRCU
31	default n
32	help
33	  This option provides a kernel module that runs performance
34	  tests on the RCU infrastructure.  The kernel module may be built
35	  after the fact on the running kernel to be tested, if desired.
36
37	  Say Y here if you want RCU performance tests to be built into
38	  the kernel.
39	  Say M if you want the RCU performance tests to build as a module.
40	  Say N if you are unsure.
41
42config RCU_TORTURE_TEST
43	tristate "torture tests for RCU"
44	depends on DEBUG_KERNEL
45	select TORTURE_TEST
46	select SRCU
47	default n
48	help
49	  This option provides a kernel module that runs torture tests
50	  on the RCU infrastructure.  The kernel module may be built
51	  after the fact on the running kernel to be tested, if desired.
52
53	  Say Y here if you want RCU torture tests to be built into
54	  the kernel.
55	  Say M if you want the RCU torture tests to build as a module.
56	  Say N if you are unsure.
57
58config RCU_REF_SCALE_TEST
59	tristate "Scalability tests for read-side synchronization (RCU and others)"
60	depends on DEBUG_KERNEL
61	select TORTURE_TEST
62	select SRCU
63	default n
64	help
65	  This option provides a kernel module that runs performance tests
66	  useful comparing RCU with various read-side synchronization mechanisms.
67	  The kernel module may be built after the fact on the running kernel to be
68	  tested, if desired.
69
70	  Say Y here if you want these performance tests built into the kernel.
71	  Say M if you want to build it as a module instead.
72	  Say N if you are unsure.
73
74config RCU_CPU_STALL_TIMEOUT
75	int "RCU CPU stall timeout in seconds"
76	depends on RCU_STALL_COMMON
77	range 3 300
78	default 21
79	help
80	  If a given RCU grace period extends more than the specified
81	  number of seconds, a CPU stall warning is printed.  If the
82	  RCU grace period persists, additional CPU stall warnings are
83	  printed at more widely spaced intervals.
84
85config RCU_EXP_CPU_STALL_TIMEOUT
86	int "Expedited RCU CPU stall timeout in milliseconds"
87	depends on RCU_STALL_COMMON
88	range 0 21000
89	default 20 if ANDROID
90	default 0 if !ANDROID
91	help
92	  If a given expedited RCU grace period extends more than the
93	  specified number of milliseconds, a CPU stall warning is printed.
94	  If the RCU grace period persists, additional CPU stall warnings
95	  are printed at more widely spaced intervals.  A value of zero
96	  says to use the RCU_CPU_STALL_TIMEOUT value converted from
97	  seconds to milliseconds.
98
99config RCU_TRACE
100	bool "Enable tracing for RCU"
101	depends on DEBUG_KERNEL
102	default y if TREE_RCU
103	select TRACE_CLOCK
104	help
105	  This option enables additional tracepoints for ftrace-style
106	  event tracing.
107
108	  Say Y here if you want to enable RCU tracing
109	  Say N if you are unsure.
110
111config RCU_EQS_DEBUG
112	bool "Provide debugging asserts for adding NO_HZ support to an arch"
113	depends on DEBUG_KERNEL
114	help
115	  This option provides consistency checks in RCU's handling of
116	  NO_HZ.  These checks have proven quite helpful in detecting
117	  bugs in arch-specific NO_HZ code.
118
119	  Say N here if you need ultimate kernel/user switch latencies
120	  Say Y if you are unsure
121
122config RCU_STRICT_GRACE_PERIOD
123	bool "Provide debug RCU implementation with short grace periods"
124	depends on DEBUG_KERNEL && RCU_EXPERT && NR_CPUS <= 4
125	default n
126	select PREEMPT_COUNT if PREEMPT=n
127	help
128	  Select this option to build an RCU variant that is strict about
129	  grace periods, making them as short as it can.  This limits
130	  scalability, destroys real-time response, degrades battery
131	  lifetime and kills performance.  Don't try this on large
132	  machines, as in systems with more than about 10 or 20 CPUs.
133	  But in conjunction with tools like KASAN, it can be helpful
134	  when looking for certain types of RCU usage bugs, for example,
135	  too-short RCU read-side critical sections.
136
137endmenu # "RCU Debugging"
138