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