From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@elte.hu, laijs@cn.fujitsu.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca,
josh@joshtriplett.org, niv@us.ibm.com, tglx@linutronix.de,
peterz@infradead.org, rostedt@goodmis.org,
Valdis.Kletnieks@vt.edu, dhowells@redhat.com,
eric.dumazet@gmail.com, darren@dvhart.com, fweisbec@gmail.com,
patches@linaro.org, "Paul E. McKenney" <paul.mckenney@linaro.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: [PATCH tip/core/rcu 33/47] rcu: Update stall-warning documentation
Date: Fri, 3 Feb 2012 17:45:08 -0800 [thread overview]
Message-ID: <1328319922-30828-33-git-send-email-paulmck@linux.vnet.ibm.com> (raw)
In-Reply-To: <1328319922-30828-1-git-send-email-paulmck@linux.vnet.ibm.com>
From: "Paul E. McKenney" <paul.mckenney@linaro.org>
Add documentation of CONFIG_RCU_CPU_STALL_VERBOSE, CONFIG_RCU_CPU_STALL_INFO,
and RCU_STALL_DELAY_DELTA. Describe multiple stall-warning messages from
a single stall, and the timing of the subsequent messages. Add headings.
Remove RCU_SECONDS_TILL_STALL_RECHECK because this value is now computed
at runtime from RCU_CPU_STALL_TIMEOUT, so that sysfs changes to the timeout
value now directly affect the RCU_SECONDS_TILL_STALL_RECHECK value.
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
Documentation/RCU/stallwarn.txt | 87 +++++++++++++++++++++++++++++++++++---
1 files changed, 80 insertions(+), 7 deletions(-)
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt
index 083d88c..523364e 100644
--- a/Documentation/RCU/stallwarn.txt
+++ b/Documentation/RCU/stallwarn.txt
@@ -12,14 +12,38 @@ CONFIG_RCU_CPU_STALL_TIMEOUT
This kernel configuration parameter defines the period of time
that RCU will wait from the beginning of a grace period until it
issues an RCU CPU stall warning. This time period is normally
- ten seconds.
+ sixty seconds.
-RCU_SECONDS_TILL_STALL_RECHECK
+ This configuration parameter may be changed at runtime via the
+ /sys/module/rcutree/parameters/rcu_cpu_stall_timeout, however
+ this parameter is checked only at the beginning of a cycle.
+ So if you are 30 seconds into a 70-second stall, setting this
+ sysfs parameter to (say) five will shorten the timeout for the
+ -next- stall, or the following warning for the current stall
+ (assuming the stall lasts long enough). It will not affect the
+ timing of the next warning for the current stall.
- This macro defines the period of time that RCU will wait after
- issuing a stall warning until it issues another stall warning
- for the same stall. This time period is normally set to three
- times the check interval plus thirty seconds.
+ Stall-warning messages may be enabled and disabled completely via
+ /sys/module/rcutree/parameters/rcu_cpu_stall_suppress.
+
+CONFIG_RCU_CPU_STALL_VERBOSE
+
+ This kernel configuration parameter causes the stall warning to
+ also dump the stacks of any tasks that are blocking the current
+ RCU-preempt grace period.
+
+RCU_CPU_STALL_INFO
+
+ This kernel configuration parameter causes the stall warning to
+ print out additional per-CPU diagnostic information, including
+ information on scheduling-clock ticks and RCU's idle-CPU tracking.
+
+RCU_STALL_DELAY_DELTA
+
+ Although the lockdep facility is extremely useful, it does add
+ some overhead. Therefore, under CONFIG_PROVE_RCU, the
+ RCU_STALL_DELAY_DELTA macro allows five extra seconds before
+ giving an RCU CPU stall warning message.
RCU_STALL_RAT_DELAY
@@ -64,6 +88,54 @@ INFO: rcu_bh_state detected stalls on CPUs/tasks: { } (detected by 4, 2502 jiffi
This is rare, but does happen from time to time in real life.
+If the CONFIG_RCU_CPU_STALL_INFO kernel configuration parameter is set,
+more information is printed with the stall-warning message, for example:
+
+ INFO: rcu_preempt detected stall on CPU
+ 0: (63959 ticks this GP) idle=241/3fffffffffffffff/0
+ (t=65000 jiffies)
+
+In kernels with CONFIG_RCU_FAST_NO_HZ, even more information is
+printed:
+
+ INFO: rcu_preempt detected stall on CPU
+ 0: (64628 ticks this GP) idle=dd5/3fffffffffffffff/0 drain=0 . timer=-1
+ (t=65000 jiffies)
+
+The "(64628 ticks this GP)" indicates that this CPU has taken more
+than 64,000 scheduling-clock interrupts during the current stalled
+grace period. If the CPU was not yet aware of the current grace
+period (for example, if it was offline), then this part of the message
+indicates how many grace periods behind the CPU is.
+
+The "idle=" portion of the message prints the dyntick-idle state.
+The hex number before the first "/" is the low-order 12 bits of the
+dynticks counter, which will have an even-numbered value if the CPU is
+in dyntick-idle mode and an odd-numbered value otherwise. The hex
+number between the two "/"s is the value of the nesting, which will
+be a small positive number if in the idle loop and a very large positive
+number (as shown above) otherwise.
+
+For CONFIG_RCU_FAST_NO_HZ kernels, the "drain=0" indicates that the
+CPU is not in the process of trying to force itself into dyntick-idle
+state, the "." indicates that the CPU has not given up forcing RCU
+into dyntick-idle mode (it would be "H" otherwise), and the "timer=-1"
+indicates that the CPU has not recented forced RCU into dyntick-idle
+mode (it would otherwise indicate the number of microseconds remaining
+in this forced state).
+
+
+Multiple Warnings From One Stall
+
+If a stall lasts long enough, multiple stall-warning messages will be
+printed for it. The second and subsequent messages are printed at
+longer intervals, so that the time between (say) the first and second
+message will be about three times the interval between the beginning
+of the stall and the first message.
+
+
+What Causes RCU CPU Stall Warnings?
+
So your kernel printed an RCU CPU stall warning. The next question is
"What caused it?" The following problems can result in RCU CPU stall
warnings:
@@ -128,4 +200,5 @@ is occurring, which will usually be in the function nearest the top of
that portion of the stack which remains the same from trace to trace.
If you can reliably trigger the stall, ftrace can be quite helpful.
-RCU bugs can often be debugged with the help of CONFIG_RCU_TRACE.
+RCU bugs can often be debugged with the help of CONFIG_RCU_TRACE
+and with RCU's event tracing.
--
1.7.8
next prev parent reply other threads:[~2012-02-04 1:53 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-04 1:44 [PATCH tip/core/rcu 0/N] v2 RCU commits for 3.4 Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 01/47] rcu: Bring RTFP.txt up to date Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 02/47] rcu: Improve synchronize_rcu() diagnostics Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 03/47] rcu: Add lockdep-RCU checks for simple self-deadlock Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 04/47] rcu: Add diagnostic for misaligned rcu_head structures Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 05/47] rcu: Avoid waking up CPUs having only kfree_rcu() callbacks Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 06/47] rcu: Move RCU_TRACE to lib/Kconfig.debug Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 07/47] s390: Convert call_rcu() to kfree_rcu(), drop ext_int_hash_update() Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 08/47] tcm_fc: Convert call_rcu() to kfree_rcu(), drop ft_tport_rcu_free() Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 09/47] ipv4: Convert call_rcu() to kfree_rcu(), drop opt_kfree_rcu() Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 10/47] ipv4: Convert call_rcu() to kfree_rcu(), drop opt_kfree_rcu Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 11/47] mac80211: Convert call_rcu() to kfree_rcu(), drop mesh_gate_node_reclaim() Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 12/47] rcu: Simplify offline processing Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 13/47] rcu: Make rcutorture flag online/offline failures Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 14/47] rcu: Limit lazy-callback duration Paul E. McKenney
2012-02-04 13:54 ` Frederic Weisbecker
2012-02-04 14:30 ` Paul E. McKenney
2012-02-04 14:32 ` Frederic Weisbecker
2012-02-04 1:44 ` [PATCH tip/core/rcu 15/47] rcu: Check for callback invocation from offline CPUs Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 16/47] rcu: Don't make callbacks go through second full grace period Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 17/47] rcu: Remove single-rcu_node optimization in rcu_start_gp() Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 18/47] rcu: Protect __rcu_read_unlock() against scheduler-using irq handlers Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 19/47] rcu: Streamline code produced by __rcu_read_unlock() Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 20/47] rcu: Prevent RCU callbacks from executing before scheduler initialized Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 21/47] rcu: Inform RCU of irq_exit() activity Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 22/47] rcu: Simplify unboosting checks Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 23/47] rcu: Clean up straggling rcu_preempt_needs_cpu() name Paul E. McKenney
2012-02-04 1:44 ` [PATCH tip/core/rcu 24/47] rcu: Check for idle-loop entry while in RCU read-side critical section Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 25/47] rcu: Make rcu_sleep_check() also check rcu_lock_map Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 26/47] rcu: Note that rcu_access_pointer() can be used for teardown Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 27/47] rcu: Remove #ifdef CONFIG_SMP from TREE_RCU Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 28/47] rcu: Set RCU CPU stall times via sysfs Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 29/47] rcu: Print scheduling-clock information on RCU CPU stall-warning messages Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 30/47] rcutorture: Permit holding off CPU-hotplug operations during boot Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 31/47] rcu: Make documentation give more realistic rcutorture duration Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 32/47] rcu: Add CPU-stall capability to rcutorture Paul E. McKenney
2012-02-04 1:45 ` Paul E. McKenney [this message]
2012-02-04 1:45 ` [PATCH tip/core/rcu 34/47] rcu: Make boolean rcutorture parameters be of type "bool" Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 35/47] rcu: Check for illegal use of RCU from offlined CPUs Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 36/47] rcu: Move synchronize_sched_expedited() to rcutree.c Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 37/47] rcu: No interrupt disabling for rcu_prepare_for_idle() Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 38/47] lockdep: Add CPU-idle/offline warning to lockdep-RCU splat Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 39/47] rcu: Rework detection of use of RCU by offline CPUs Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 40/47] rcu: Call out dangers of expedited RCU primitives Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 41/47] rcu: Trace only after NULL-pointer check Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 42/47] rcu: Convert WARN_ON_ONCE() in rcu_lock_acquire() to lockdep Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 43/47] PTR_ERR should be called before its argument is cleared Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 44/47] rcu: Remove redundant check for rcu_head misalignment Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 45/47] rcu: Allow nesting of rcu_idle_enter() and rcu_idle_exit() Paul E. McKenney
2012-02-09 4:07 ` Frederic Weisbecker
2012-02-09 15:26 ` Paul E. McKenney
2012-02-09 15:33 ` Frederic Weisbecker
2012-02-04 1:45 ` [PATCH tip/core/rcu 46/47] rcu: Add RCU_NONIDLE() for idle-loop RCU read-side critical sections Paul E. McKenney
2012-02-04 1:45 ` [PATCH tip/core/rcu 47/47] cpuidle: Inform RCU of " Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1328319922-30828-33-git-send-email-paulmck@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@linux-foundation.org \
--cc=darren@dvhart.com \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=eric.dumazet@gmail.com \
--cc=fweisbec@gmail.com \
--cc=josh@joshtriplett.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
--cc=niv@us.ibm.com \
--cc=patches@linaro.org \
--cc=paul.mckenney@linaro.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®