0001 # SPDX-License-Identifier: GPL-2.0-only
0002 #
0003 # RCU-related debugging configuration options
0004 #
0005
0006 menu "RCU Debugging"
0007
0008 config PROVE_RCU
0009 def_bool PROVE_LOCKING
0010
0011 config PROVE_RCU_LIST
0012 bool "RCU list lockdep debugging"
0013 depends on PROVE_RCU && RCU_EXPERT
0014 default n
0015 help
0016 Enable RCU lockdep checking for list usages. By default it is
0017 turned off since there are several list RCU users that still
0018 need to be converted to pass a lockdep expression. To prevent
0019 false-positive splats, we keep it default disabled but once all
0020 users are converted, we can remove this config option.
0021
0022 config TORTURE_TEST
0023 tristate
0024 default n
0025
0026 config RCU_SCALE_TEST
0027 tristate "performance tests for RCU"
0028 depends on DEBUG_KERNEL
0029 select TORTURE_TEST
0030 select SRCU
0031 default n
0032 help
0033 This option provides a kernel module that runs performance
0034 tests on the RCU infrastructure. The kernel module may be built
0035 after the fact on the running kernel to be tested, if desired.
0036
0037 Say Y here if you want RCU performance tests to be built into
0038 the kernel.
0039 Say M if you want the RCU performance tests to build as a module.
0040 Say N if you are unsure.
0041
0042 config RCU_TORTURE_TEST
0043 tristate "torture tests for RCU"
0044 depends on DEBUG_KERNEL
0045 select TORTURE_TEST
0046 select SRCU
0047 default n
0048 help
0049 This option provides a kernel module that runs torture tests
0050 on the RCU infrastructure. The kernel module may be built
0051 after the fact on the running kernel to be tested, if desired.
0052
0053 Say Y here if you want RCU torture tests to be built into
0054 the kernel.
0055 Say M if you want the RCU torture tests to build as a module.
0056 Say N if you are unsure.
0057
0058 config RCU_REF_SCALE_TEST
0059 tristate "Scalability tests for read-side synchronization (RCU and others)"
0060 depends on DEBUG_KERNEL
0061 select TORTURE_TEST
0062 select SRCU
0063 default n
0064 help
0065 This option provides a kernel module that runs performance tests
0066 useful comparing RCU with various read-side synchronization mechanisms.
0067 The kernel module may be built after the fact on the running kernel to be
0068 tested, if desired.
0069
0070 Say Y here if you want these performance tests built into the kernel.
0071 Say M if you want to build it as a module instead.
0072 Say N if you are unsure.
0073
0074 config RCU_CPU_STALL_TIMEOUT
0075 int "RCU CPU stall timeout in seconds"
0076 depends on RCU_STALL_COMMON
0077 range 3 300
0078 default 21
0079 help
0080 If a given RCU grace period extends more than the specified
0081 number of seconds, a CPU stall warning is printed. If the
0082 RCU grace period persists, additional CPU stall warnings are
0083 printed at more widely spaced intervals.
0084
0085 config RCU_EXP_CPU_STALL_TIMEOUT
0086 int "Expedited RCU CPU stall timeout in milliseconds"
0087 depends on RCU_STALL_COMMON
0088 range 0 21000
0089 default 0
0090 help
0091 If a given expedited RCU grace period extends more than the
0092 specified number of milliseconds, a CPU stall warning is printed.
0093 If the RCU grace period persists, additional CPU stall warnings
0094 are printed at more widely spaced intervals. A value of zero
0095 says to use the RCU_CPU_STALL_TIMEOUT value converted from
0096 seconds to milliseconds.
0097
0098 config RCU_TRACE
0099 bool "Enable tracing for RCU"
0100 depends on DEBUG_KERNEL
0101 default y if TREE_RCU
0102 select TRACE_CLOCK
0103 help
0104 This option enables additional tracepoints for ftrace-style
0105 event tracing.
0106
0107 Say Y here if you want to enable RCU tracing
0108 Say N if you are unsure.
0109
0110 config RCU_EQS_DEBUG
0111 bool "Provide debugging asserts for adding NO_HZ support to an arch"
0112 depends on DEBUG_KERNEL
0113 help
0114 This option provides consistency checks in RCU's handling of
0115 NO_HZ. These checks have proven quite helpful in detecting
0116 bugs in arch-specific NO_HZ code.
0117
0118 Say N here if you need ultimate kernel/user switch latencies
0119 Say Y if you are unsure
0120
0121 config RCU_STRICT_GRACE_PERIOD
0122 bool "Provide debug RCU implementation with short grace periods"
0123 depends on DEBUG_KERNEL && RCU_EXPERT && NR_CPUS <= 4 && !TINY_RCU
0124 default n
0125 select PREEMPT_COUNT if PREEMPT=n
0126 help
0127 Select this option to build an RCU variant that is strict about
0128 grace periods, making them as short as it can. This limits
0129 scalability, destroys real-time response, degrades battery
0130 lifetime and kills performance. Don't try this on large
0131 machines, as in systems with more than about 10 or 20 CPUs.
0132 But in conjunction with tools like KASAN, it can be helpful
0133 when looking for certain types of RCU usage bugs, for example,
0134 too-short RCU read-side critical sections.
0135
0136 endmenu # "RCU Debugging"