diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2008-08-10 21:35:38 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-11 07:35:18 -0400 |
commit | 67182ae1c42206e516f7efb292b745e826497b24 (patch) | |
tree | d2d402550a0432489090264df95a8154597dc989 /lib | |
parent | c4c0c56a7a85ed5725786219e4fbca7e840b1531 (diff) |
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 <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: David Witbrodt <dawitbro@sbcglobal.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index e1d4764435ed..2fb6d90bf1e6 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -597,6 +597,19 @@ config RCU_TORTURE_TEST_RUNNABLE | |||
597 | Say N here if you want the RCU torture tests to start only | 597 | Say N here if you want the RCU torture tests to start only |
598 | after being manually enabled via /proc. | 598 | after being manually enabled via /proc. |
599 | 599 | ||
600 | config RCU_CPU_STALL | ||
601 | bool "Check for stalled CPUs delaying RCU grace periods" | ||
602 | depends on CLASSIC_RCU | ||
603 | default n | ||
604 | help | ||
605 | This option causes RCU to printk information on which | ||
606 | CPUs are delaying the current grace period, but only when | ||
607 | the grace period extends for excessive time periods. | ||
608 | |||
609 | Say Y if you want RCU to perform such checks. | ||
610 | |||
611 | Say N if you are unsure. | ||
612 | |||
600 | config KPROBES_SANITY_TEST | 613 | config KPROBES_SANITY_TEST |
601 | bool "Kprobes sanity tests" | 614 | bool "Kprobes sanity tests" |
602 | depends on DEBUG_KERNEL | 615 | depends on DEBUG_KERNEL |