Skip to content

Commit 43a0a2a

Browse files
committed
rcu: Move RCU debug Kconfig options to kernel/rcu
RCU's debugging Kconfig options are in the unintuitive location lib/Kconfig.debug, and there are enough of them that it would be good for them to be more centralized. This commit therefore extracts RCU's Kconfig options from init/Kconfig into a new kernel/rcu/Kconfig.debug file. Reported-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
1 parent 0af92d4 commit 43a0a2a

2 files changed

Lines changed: 83 additions & 78 deletions

File tree

‎kernel/rcu/Kconfig.debug‎

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#
2+
# RCU-related debugging configuration options
3+
#
4+
5+
menu "RCU Debugging"
6+
7+
config PROVE_RCU
8+
def_bool PROVE_LOCKING
9+
10+
config TORTURE_TEST
11+
tristate
12+
default n
13+
14+
config RCU_PERF_TEST
15+
tristate "performance tests for RCU"
16+
depends on DEBUG_KERNEL
17+
select TORTURE_TEST
18+
select SRCU
19+
select TASKS_RCU
20+
default n
21+
help
22+
This option provides a kernel module that runs performance
23+
tests on the RCU infrastructure. The kernel module may be built
24+
after the fact on the running kernel to be tested, if desired.
25+
26+
Say Y here if you want RCU performance tests to be built into
27+
the kernel.
28+
Say M if you want the RCU performance tests to build as a module.
29+
Say N if you are unsure.
30+
31+
config RCU_TORTURE_TEST
32+
tristate "torture tests for RCU"
33+
depends on DEBUG_KERNEL
34+
select TORTURE_TEST
35+
select SRCU
36+
select TASKS_RCU
37+
default n
38+
help
39+
This option provides a kernel module that runs torture tests
40+
on the RCU infrastructure. The kernel module may be built
41+
after the fact on the running kernel to be tested, if desired.
42+
43+
Say Y here if you want RCU torture tests to be built into
44+
the kernel.
45+
Say M if you want the RCU torture tests to build as a module.
46+
Say N if you are unsure.
47+
48+
config RCU_CPU_STALL_TIMEOUT
49+
int "RCU CPU stall timeout in seconds"
50+
depends on RCU_STALL_COMMON
51+
range 3 300
52+
default 21
53+
help
54+
If a given RCU grace period extends more than the specified
55+
number of seconds, a CPU stall warning is printed. If the
56+
RCU grace period persists, additional CPU stall warnings are
57+
printed at more widely spaced intervals.
58+
59+
config RCU_TRACE
60+
bool "Enable tracing for RCU"
61+
depends on DEBUG_KERNEL
62+
default y if TREE_RCU
63+
select TRACE_CLOCK
64+
help
65+
This option enables additional tracepoints for ftrace-style
66+
event tracing.
67+
68+
Say Y here if you want to enable RCU tracing
69+
Say N if you are unsure.
70+
71+
config RCU_EQS_DEBUG
72+
bool "Provide debugging asserts for adding NO_HZ support to an arch"
73+
depends on DEBUG_KERNEL
74+
help
75+
This option provides consistency checks in RCU's handling of
76+
NO_HZ. These checks have proven quite helpful in detecting
77+
bugs in arch-specific NO_HZ code.
78+
79+
Say N here if you need ultimate kernel/user switch latencies
80+
Say Y if you are unsure
81+
82+
endmenu # "RCU Debugging"

‎lib/Kconfig.debug‎

Lines changed: 1 addition & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,84 +1301,7 @@ config DEBUG_CREDENTIALS
13011301

13021302
If unsure, say N.
13031303

1304-
menu "RCU Debugging"
1305-
1306-
config PROVE_RCU
1307-
def_bool PROVE_LOCKING
1308-
1309-
config TORTURE_TEST
1310-
tristate
1311-
default n
1312-
1313-
config RCU_PERF_TEST
1314-
tristate "performance tests for RCU"
1315-
depends on DEBUG_KERNEL
1316-
select TORTURE_TEST
1317-
select SRCU
1318-
select TASKS_RCU
1319-
default n
1320-
help
1321-
This option provides a kernel module that runs performance
1322-
tests on the RCU infrastructure. The kernel module may be built
1323-
after the fact on the running kernel to be tested, if desired.
1324-
1325-
Say Y here if you want RCU performance tests to be built into
1326-
the kernel.
1327-
Say M if you want the RCU performance tests to build as a module.
1328-
Say N if you are unsure.
1329-
1330-
config RCU_TORTURE_TEST
1331-
tristate "torture tests for RCU"
1332-
depends on DEBUG_KERNEL
1333-
select TORTURE_TEST
1334-
select SRCU
1335-
select TASKS_RCU
1336-
default n
1337-
help
1338-
This option provides a kernel module that runs torture tests
1339-
on the RCU infrastructure. The kernel module may be built
1340-
after the fact on the running kernel to be tested, if desired.
1341-
1342-
Say Y here if you want RCU torture tests to be built into
1343-
the kernel.
1344-
Say M if you want the RCU torture tests to build as a module.
1345-
Say N if you are unsure.
1346-
1347-
config RCU_CPU_STALL_TIMEOUT
1348-
int "RCU CPU stall timeout in seconds"
1349-
depends on RCU_STALL_COMMON
1350-
range 3 300
1351-
default 21
1352-
help
1353-
If a given RCU grace period extends more than the specified
1354-
number of seconds, a CPU stall warning is printed. If the
1355-
RCU grace period persists, additional CPU stall warnings are
1356-
printed at more widely spaced intervals.
1357-
1358-
config RCU_TRACE
1359-
bool "Enable tracing for RCU"
1360-
depends on DEBUG_KERNEL
1361-
default y if TREE_RCU
1362-
select TRACE_CLOCK
1363-
help
1364-
This option enables additional tracepoints for ftrace-style
1365-
event tracing.
1366-
1367-
Say Y here if you want to enable RCU tracing
1368-
Say N if you are unsure.
1369-
1370-
config RCU_EQS_DEBUG
1371-
bool "Provide debugging asserts for adding NO_HZ support to an arch"
1372-
depends on DEBUG_KERNEL
1373-
help
1374-
This option provides consistency checks in RCU's handling of
1375-
NO_HZ. These checks have proven quite helpful in detecting
1376-
bugs in arch-specific NO_HZ code.
1377-
1378-
Say N here if you need ultimate kernel/user switch latencies
1379-
Say Y if you are unsure
1380-
1381-
endmenu # "RCU Debugging"
1304+
source "kernel/rcu/Kconfig.debug"
13821305

13831306
config DEBUG_WQ_FORCE_RR_CPU
13841307
bool "Force round-robin CPU selection for unbound work items"

0 commit comments

Comments
 (0)