diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-01-22 21:24:08 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-03-11 16:22:38 -0400 |
commit | 37745d281069682d901f00c0121949a7d224195f (patch) | |
tree | 0c15fd487faa046a257336b4205572b066873ca7 /lib | |
parent | 237a0f2193c6daf9b1edd7fd15d55e680f268952 (diff) |
rcu: Provide diagnostic option to slow down grace-period initialization
Grace-period initialization normally proceeds quite quickly, so
that it is very difficult to reproduce races against grace-period
initialization. This commit therefore allows grace-period
initialization to be artificially slowed down, increasing
race-reproduction probability. A pair of new Kconfig parameters are
provided, CONFIG_RCU_TORTURE_TEST_SLOW_INIT to enable the slowdowns, and
CONFIG_RCU_TORTURE_TEST_SLOW_INIT_DELAY to specify the number of jiffies
of slowdown to apply. A boot-time parameter named rcutree.gp_init_delay
allows boot-time delay to be specified. By default, no delay will be
applied even if CONFIG_RCU_TORTURE_TEST_SLOW_INIT is set.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index c5cefb3c009c..feee8dab441e 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -1257,6 +1257,30 @@ config RCU_TORTURE_TEST_RUNNABLE | |||
1257 | Say N here if you want the RCU torture tests to start only | 1257 | Say N here if you want the RCU torture tests to start only |
1258 | after being manually enabled via /proc. | 1258 | after being manually enabled via /proc. |
1259 | 1259 | ||
1260 | config RCU_TORTURE_TEST_SLOW_INIT | ||
1261 | bool "Slow down RCU grace-period initialization to expose races" | ||
1262 | depends on RCU_TORTURE_TEST | ||
1263 | help | ||
1264 | This option makes grace-period initialization block for a | ||
1265 | few jiffies between initializing each pair of consecutive | ||
1266 | rcu_node structures. This helps to expose races involving | ||
1267 | grace-period initialization, in other words, it makes your | ||
1268 | kernel less stable. It can also greatly increase grace-period | ||
1269 | latency, especially on systems with large numbers of CPUs. | ||
1270 | This is useful when torture-testing RCU, but in almost no | ||
1271 | other circumstance. | ||
1272 | |||
1273 | Say Y here if you want your system to crash and hang more often. | ||
1274 | Say N if you want a sane system. | ||
1275 | |||
1276 | config RCU_TORTURE_TEST_SLOW_INIT_DELAY | ||
1277 | int "How much to slow down RCU grace-period initialization" | ||
1278 | range 0 5 | ||
1279 | default 0 | ||
1280 | help | ||
1281 | This option specifies the number of jiffies to wait between | ||
1282 | each rcu_node structure initialization. | ||
1283 | |||
1260 | config RCU_CPU_STALL_TIMEOUT | 1284 | config RCU_CPU_STALL_TIMEOUT |
1261 | int "RCU CPU stall timeout in seconds" | 1285 | int "RCU CPU stall timeout in seconds" |
1262 | depends on RCU_STALL_COMMON | 1286 | depends on RCU_STALL_COMMON |