|author||Paul E. McKenney <email@example.com>||2008-08-10 18:35:38 -0700|
|committer||Ingo Molnar <firstname.lastname@example.org>||2008-08-11 13:35:18 +0200|
rcu, debug: detect stalled grace periods
this is a diagnostic patch for Classic RCU. The approach is to record a timestamp at the beginning of the grace period (in rcu_start_batch()), then have rcu_check_callbacks() complain if: 1. it is running on a CPU that has holding up grace periods for a long time (say one second). This will identify the culprit assuming that the culprit has not disabled hardware irqs, instruction execution, or some such. 2. it is running on a CPU that is not holding up grace periods, but grace periods have been held up for an even longer time (say two seconds). It is enabled via the default-off CONFIG_DEBUG_RCU_STALL kernel parameter. Rather than exponential backoff, it backs off to once per 30 seconds. My feeling upon thinking on it was that if you have stalled RCU grace periods for that long, a few extra printk() messages are probably the least of your worries... Signed-off-by: Paul E. McKenney <email@example.com> Cc: Peter Zijlstra <firstname.lastname@example.org> Cc: Yinghai Lu <email@example.com> Cc: David Witbrodt <firstname.lastname@example.org> Signed-off-by: Ingo Molnar <email@example.com>
Diffstat (limited to 'lib')
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index e1d4764435e..2fb6d90bf1e 100644
@@ -597,6 +597,19 @@ config RCU_TORTURE_TEST_RUNNABLE
Say N here if you want the RCU torture tests to start only
after being manually enabled via /proc.
+ bool "Check for stalled CPUs delaying RCU grace periods"
+ depends on CLASSIC_RCU
+ default n
+ This option causes RCU to printk information on which
+ CPUs are delaying the current grace period, but only when
+ the grace period extends for excessive time periods.
+ Say Y if you want RCU to perform such checks.
+ Say N if you are unsure.
bool "Kprobes sanity tests"
depends on DEBUG_KERNEL