^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) # SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) # RCU-related debugging configuration options
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) menu "RCU Debugging"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) config PROVE_RCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) def_bool PROVE_LOCKING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) config PROVE_RCU_LIST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) bool "RCU list lockdep debugging"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) depends on PROVE_RCU && RCU_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) Enable RCU lockdep checking for list usages. By default it is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) turned off since there are several list RCU users that still
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) need to be converted to pass a lockdep expression. To prevent
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) false-positive splats, we keep it default disabled but once all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) users are converted, we can remove this config option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) config TORTURE_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) tristate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) config RCU_SCALE_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) tristate "performance tests for RCU"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) depends on DEBUG_KERNEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) select TORTURE_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) select SRCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) select TASKS_RCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) select TASKS_RUDE_RCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) select TASKS_TRACE_RCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) This option provides a kernel module that runs performance
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) tests on the RCU infrastructure. The kernel module may be built
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) after the fact on the running kernel to be tested, if desired.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) Say Y here if you want RCU performance tests to be built into
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) the kernel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) Say M if you want the RCU performance tests to build as a module.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) Say N if you are unsure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) config RCU_TORTURE_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) tristate "torture tests for RCU"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) depends on DEBUG_KERNEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) select TORTURE_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) select SRCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) select TASKS_RCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) select TASKS_RUDE_RCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) select TASKS_TRACE_RCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) This option provides a kernel module that runs torture tests
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) on the RCU infrastructure. The kernel module may be built
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) after the fact on the running kernel to be tested, if desired.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) Say Y here if you want RCU torture tests to be built into
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) the kernel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) Say M if you want the RCU torture tests to build as a module.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) Say N if you are unsure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) config RCU_REF_SCALE_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) tristate "Scalability tests for read-side synchronization (RCU and others)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) depends on DEBUG_KERNEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) select TORTURE_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) select SRCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) select TASKS_RCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) select TASKS_RUDE_RCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) select TASKS_TRACE_RCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) This option provides a kernel module that runs performance tests
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) useful comparing RCU with various read-side synchronization mechanisms.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) The kernel module may be built after the fact on the running kernel to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) tested, if desired.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) Say Y here if you want these performance tests built into the kernel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) Say M if you want to build it as a module instead.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) Say N if you are unsure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) config RCU_CPU_STALL_TIMEOUT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) int "RCU CPU stall timeout in seconds"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) depends on RCU_STALL_COMMON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) range 3 300
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) default 21
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) If a given RCU grace period extends more than the specified
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) number of seconds, a CPU stall warning is printed. If the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) RCU grace period persists, additional CPU stall warnings are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) printed at more widely spaced intervals.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) config BOOTPARAM_RCU_STALL_PANIC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) bool "Panic (Reboot) On RCU CPU stall timeout"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) depends on RCU_STALL_COMMON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) Say Y here to enable the kernel to panic on "rcu stall timeout",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) which are bugs that RCU grace period extends more than 21 seconds
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) (configurable using the RCU_CPU_STALL_TIMEOUT).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) The panic can be used in combination with panic_timeout,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) to cause the system to reboot automatically after a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) stall timeout. This feature is useful for high-availability
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) systems that have uptime guarantees and where a stall timeout
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) must be resolved ASAP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) Say N if unsure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) config BOOTPARAM_RCU_STALL_PANIC_VALUE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) depends on RCU_STALL_COMMON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) range 0 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) default 0 if !BOOTPARAM_RCU_STALL_PANIC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) default 1 if BOOTPARAM_RCU_STALL_PANIC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) config RCU_TRACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) bool "Enable tracing for RCU"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) depends on DEBUG_KERNEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) default y if TREE_RCU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) select TRACE_CLOCK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) This option enables additional tracepoints for ftrace-style
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) event tracing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) Say Y here if you want to enable RCU tracing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) Say N if you are unsure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) config RCU_EQS_DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) bool "Provide debugging asserts for adding NO_HZ support to an arch"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) depends on DEBUG_KERNEL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) This option provides consistency checks in RCU's handling of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) NO_HZ. These checks have proven quite helpful in detecting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) bugs in arch-specific NO_HZ code.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) Say N here if you need ultimate kernel/user switch latencies
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) Say Y if you are unsure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) config RCU_STRICT_GRACE_PERIOD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) bool "Provide debug RCU implementation with short grace periods"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) depends on DEBUG_KERNEL && RCU_EXPERT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) default n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) select PREEMPT_COUNT if PREEMPT=n
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) Select this option to build an RCU variant that is strict about
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) grace periods, making them as short as it can. This limits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) scalability, destroys real-time response, degrades battery
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) lifetime and kills performance. Don't try this on large
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) machines, as in systems with more than about 10 or 20 CPUs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) But in conjunction with tools like KASAN, it can be helpful
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) when looking for certain types of RCU usage bugs, for example,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) too-short RCU read-side critical sections.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) endmenu # "RCU Debugging"