mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
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>
This commit is contained in:
@@ -1257,6 +1257,30 @@ config RCU_TORTURE_TEST_RUNNABLE
|
||||
Say N here if you want the RCU torture tests to start only
|
||||
after being manually enabled via /proc.
|
||||
|
||||
config RCU_TORTURE_TEST_SLOW_INIT
|
||||
bool "Slow down RCU grace-period initialization to expose races"
|
||||
depends on RCU_TORTURE_TEST
|
||||
help
|
||||
This option makes grace-period initialization block for a
|
||||
few jiffies between initializing each pair of consecutive
|
||||
rcu_node structures. This helps to expose races involving
|
||||
grace-period initialization, in other words, it makes your
|
||||
kernel less stable. It can also greatly increase grace-period
|
||||
latency, especially on systems with large numbers of CPUs.
|
||||
This is useful when torture-testing RCU, but in almost no
|
||||
other circumstance.
|
||||
|
||||
Say Y here if you want your system to crash and hang more often.
|
||||
Say N if you want a sane system.
|
||||
|
||||
config RCU_TORTURE_TEST_SLOW_INIT_DELAY
|
||||
int "How much to slow down RCU grace-period initialization"
|
||||
range 0 5
|
||||
default 0
|
||||
help
|
||||
This option specifies the number of jiffies to wait between
|
||||
each rcu_node structure initialization.
|
||||
|
||||
config RCU_CPU_STALL_TIMEOUT
|
||||
int "RCU CPU stall timeout in seconds"
|
||||
depends on RCU_STALL_COMMON
|
||||
|
||||
Reference in New Issue
Block a user