1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 243a0a2a7SPaul E. McKenney# 343a0a2a7SPaul E. McKenney# RCU-related debugging configuration options 443a0a2a7SPaul E. McKenney# 543a0a2a7SPaul E. McKenney 643a0a2a7SPaul E. McKenneymenu "RCU Debugging" 743a0a2a7SPaul E. McKenney 843a0a2a7SPaul E. McKenneyconfig PROVE_RCU 943a0a2a7SPaul E. McKenney def_bool PROVE_LOCKING 1043a0a2a7SPaul E. McKenney 1128875945SJoel Fernandes (Google)config PROVE_RCU_LIST 1228875945SJoel Fernandes (Google) bool "RCU list lockdep debugging" 1328875945SJoel Fernandes (Google) depends on PROVE_RCU && RCU_EXPERT 1428875945SJoel Fernandes (Google) default n 1528875945SJoel Fernandes (Google) help 1628875945SJoel Fernandes (Google) Enable RCU lockdep checking for list usages. By default it is 1728875945SJoel Fernandes (Google) turned off since there are several list RCU users that still 1828875945SJoel Fernandes (Google) need to be converted to pass a lockdep expression. To prevent 1928875945SJoel Fernandes (Google) false-positive splats, we keep it default disabled but once all 2028875945SJoel Fernandes (Google) users are converted, we can remove this config option. 2128875945SJoel Fernandes (Google) 2243a0a2a7SPaul E. McKenneyconfig TORTURE_TEST 2343a0a2a7SPaul E. McKenney tristate 2443a0a2a7SPaul E. McKenney default n 2543a0a2a7SPaul E. McKenney 264e88ec4aSPaul E. McKenneyconfig RCU_SCALE_TEST 2743a0a2a7SPaul E. McKenney tristate "performance tests for RCU" 2843a0a2a7SPaul E. McKenney depends on DEBUG_KERNEL 2943a0a2a7SPaul E. McKenney select TORTURE_TEST 3043a0a2a7SPaul E. McKenney default n 3143a0a2a7SPaul E. McKenney help 3243a0a2a7SPaul E. McKenney This option provides a kernel module that runs performance 3343a0a2a7SPaul E. McKenney tests on the RCU infrastructure. The kernel module may be built 3443a0a2a7SPaul E. McKenney after the fact on the running kernel to be tested, if desired. 3543a0a2a7SPaul E. McKenney 3643a0a2a7SPaul E. McKenney Say Y here if you want RCU performance tests to be built into 3743a0a2a7SPaul E. McKenney the kernel. 3843a0a2a7SPaul E. McKenney Say M if you want the RCU performance tests to build as a module. 3943a0a2a7SPaul E. McKenney Say N if you are unsure. 4043a0a2a7SPaul E. McKenney 4143a0a2a7SPaul E. McKenneyconfig RCU_TORTURE_TEST 4243a0a2a7SPaul E. McKenney tristate "torture tests for RCU" 4343a0a2a7SPaul E. McKenney depends on DEBUG_KERNEL 4443a0a2a7SPaul E. McKenney select TORTURE_TEST 4543a0a2a7SPaul E. McKenney default n 4643a0a2a7SPaul E. McKenney help 4743a0a2a7SPaul E. McKenney This option provides a kernel module that runs torture tests 4843a0a2a7SPaul E. McKenney on the RCU infrastructure. The kernel module may be built 4943a0a2a7SPaul E. McKenney after the fact on the running kernel to be tested, if desired. 5043a0a2a7SPaul E. McKenney 5143a0a2a7SPaul E. McKenney Say Y here if you want RCU torture tests to be built into 5243a0a2a7SPaul E. McKenney the kernel. 5343a0a2a7SPaul E. McKenney Say M if you want the RCU torture tests to build as a module. 5443a0a2a7SPaul E. McKenney Say N if you are unsure. 5543a0a2a7SPaul E. McKenney 568e4ec3d0SPaul E. McKenneyconfig RCU_REF_SCALE_TEST 578e4ec3d0SPaul E. McKenney tristate "Scalability tests for read-side synchronization (RCU and others)" 58653ed64bSJoel Fernandes (Google) depends on DEBUG_KERNEL 59653ed64bSJoel Fernandes (Google) select TORTURE_TEST 60653ed64bSJoel Fernandes (Google) default n 61653ed64bSJoel Fernandes (Google) help 62653ed64bSJoel Fernandes (Google) This option provides a kernel module that runs performance tests 63653ed64bSJoel Fernandes (Google) useful comparing RCU with various read-side synchronization mechanisms. 64653ed64bSJoel Fernandes (Google) The kernel module may be built after the fact on the running kernel to be 65653ed64bSJoel Fernandes (Google) tested, if desired. 66653ed64bSJoel Fernandes (Google) 67653ed64bSJoel Fernandes (Google) Say Y here if you want these performance tests built into the kernel. 68653ed64bSJoel Fernandes (Google) Say M if you want to build it as a module instead. 69653ed64bSJoel Fernandes (Google) Say N if you are unsure. 70653ed64bSJoel Fernandes (Google) 7143a0a2a7SPaul E. McKenneyconfig RCU_CPU_STALL_TIMEOUT 7243a0a2a7SPaul E. McKenney int "RCU CPU stall timeout in seconds" 7343a0a2a7SPaul E. McKenney depends on RCU_STALL_COMMON 7443a0a2a7SPaul E. McKenney range 3 300 7543a0a2a7SPaul E. McKenney default 21 7643a0a2a7SPaul E. McKenney help 7743a0a2a7SPaul E. McKenney If a given RCU grace period extends more than the specified 7843a0a2a7SPaul E. McKenney number of seconds, a CPU stall warning is printed. If the 7943a0a2a7SPaul E. McKenney RCU grace period persists, additional CPU stall warnings are 8043a0a2a7SPaul E. McKenney printed at more widely spaced intervals. 8143a0a2a7SPaul E. McKenney 8228b3ae42SUladzislau Rezkiconfig RCU_EXP_CPU_STALL_TIMEOUT 8328b3ae42SUladzislau Rezki int "Expedited RCU CPU stall timeout in milliseconds" 8428b3ae42SUladzislau Rezki depends on RCU_STALL_COMMON 85*84ec7c20SPaul E. McKenney range 0 300000 861045a067SChristoph Hellwig default 0 8728b3ae42SUladzislau Rezki help 8828b3ae42SUladzislau Rezki If a given expedited RCU grace period extends more than the 8928b3ae42SUladzislau Rezki specified number of milliseconds, a CPU stall warning is printed. 9028b3ae42SUladzislau Rezki If the RCU grace period persists, additional CPU stall warnings 9128b3ae42SUladzislau Rezki are printed at more widely spaced intervals. A value of zero 9228b3ae42SUladzislau Rezki says to use the RCU_CPU_STALL_TIMEOUT value converted from 9328b3ae42SUladzislau Rezki seconds to milliseconds. 9428b3ae42SUladzislau Rezki 95be42f00bSZhen Leiconfig RCU_CPU_STALL_CPUTIME 96be42f00bSZhen Lei bool "Provide additional RCU stall debug information" 97be42f00bSZhen Lei depends on RCU_STALL_COMMON 98be42f00bSZhen Lei default n 99be42f00bSZhen Lei help 100be42f00bSZhen Lei Collect statistics during the sampling period, such as the number of 101be42f00bSZhen Lei (hard interrupts, soft interrupts, task switches) and the cputime of 102be42f00bSZhen Lei (hard interrupts, soft interrupts, kernel tasks) are added to the 103be42f00bSZhen Lei RCU stall report. For multiple continuous RCU stalls, all sampling 104be42f00bSZhen Lei periods begin at half of the first RCU stall timeout. 105be42f00bSZhen Lei The boot option rcupdate.rcu_cpu_stall_cputime has the same function 106be42f00bSZhen Lei as this one, but will override this if it exists. 107be42f00bSZhen Lei 10843a0a2a7SPaul E. McKenneyconfig RCU_TRACE 10943a0a2a7SPaul E. McKenney bool "Enable tracing for RCU" 11043a0a2a7SPaul E. McKenney depends on DEBUG_KERNEL 11143a0a2a7SPaul E. McKenney default y if TREE_RCU 11243a0a2a7SPaul E. McKenney select TRACE_CLOCK 11343a0a2a7SPaul E. McKenney help 11443a0a2a7SPaul E. McKenney This option enables additional tracepoints for ftrace-style 11543a0a2a7SPaul E. McKenney event tracing. 11643a0a2a7SPaul E. McKenney 11743a0a2a7SPaul E. McKenney Say Y here if you want to enable RCU tracing 11843a0a2a7SPaul E. McKenney Say N if you are unsure. 11943a0a2a7SPaul E. McKenney 12043a0a2a7SPaul E. McKenneyconfig RCU_EQS_DEBUG 12143a0a2a7SPaul E. McKenney bool "Provide debugging asserts for adding NO_HZ support to an arch" 12243a0a2a7SPaul E. McKenney depends on DEBUG_KERNEL 12343a0a2a7SPaul E. McKenney help 12443a0a2a7SPaul E. McKenney This option provides consistency checks in RCU's handling of 12543a0a2a7SPaul E. McKenney NO_HZ. These checks have proven quite helpful in detecting 12643a0a2a7SPaul E. McKenney bugs in arch-specific NO_HZ code. 12743a0a2a7SPaul E. McKenney 12843a0a2a7SPaul E. McKenney Say N here if you need ultimate kernel/user switch latencies 12943a0a2a7SPaul E. McKenney Say Y if you are unsure 13043a0a2a7SPaul E. McKenney 1318cbd0e38SPaul E. McKenneyconfig RCU_STRICT_GRACE_PERIOD 1328cbd0e38SPaul E. McKenney bool "Provide debug RCU implementation with short grace periods" 133b3ade95bSPaul E. McKenney depends on DEBUG_KERNEL && RCU_EXPERT && NR_CPUS <= 4 && !TINY_RCU 1348cbd0e38SPaul E. McKenney default n 1358cbd0e38SPaul E. McKenney select PREEMPT_COUNT if PREEMPT=n 1368cbd0e38SPaul E. McKenney help 1378cbd0e38SPaul E. McKenney Select this option to build an RCU variant that is strict about 1388cbd0e38SPaul E. McKenney grace periods, making them as short as it can. This limits 1398cbd0e38SPaul E. McKenney scalability, destroys real-time response, degrades battery 1408cbd0e38SPaul E. McKenney lifetime and kills performance. Don't try this on large 1418cbd0e38SPaul E. McKenney machines, as in systems with more than about 10 or 20 CPUs. 1428cbd0e38SPaul E. McKenney But in conjunction with tools like KASAN, it can be helpful 1438cbd0e38SPaul E. McKenney when looking for certain types of RCU usage bugs, for example, 1448cbd0e38SPaul E. McKenney too-short RCU read-side critical sections. 1458cbd0e38SPaul E. McKenney 14643a0a2a7SPaul E. McKenneyendmenu # "RCU Debugging" 147