diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-08-19 14:59:43 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-09-25 09:49:37 -0400 |
commit | 64d3b7a1d5289486df2d8bce36e23ed5ebc80a3d (patch) | |
tree | 279257d8590630f4a19af9f692117b6202608bfb /Documentation/RCU | |
parent | 272b98c6455f00884f0350f775c5342358ebb73f (diff) |
rcu: Update stall-warning documentation
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'Documentation/RCU')
-rw-r--r-- | Documentation/RCU/stallwarn.txt | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt index 8e9359de1d28..6f3a0057548e 100644 --- a/Documentation/RCU/stallwarn.txt +++ b/Documentation/RCU/stallwarn.txt | |||
@@ -12,12 +12,12 @@ CONFIG_RCU_CPU_STALL_TIMEOUT | |||
12 | This kernel configuration parameter defines the period of time | 12 | This kernel configuration parameter defines the period of time |
13 | that RCU will wait from the beginning of a grace period until it | 13 | that RCU will wait from the beginning of a grace period until it |
14 | issues an RCU CPU stall warning. This time period is normally | 14 | issues an RCU CPU stall warning. This time period is normally |
15 | sixty seconds. | 15 | 21 seconds. |
16 | 16 | ||
17 | This configuration parameter may be changed at runtime via the | 17 | This configuration parameter may be changed at runtime via the |
18 | /sys/module/rcutree/parameters/rcu_cpu_stall_timeout, however | 18 | /sys/module/rcutree/parameters/rcu_cpu_stall_timeout, however |
19 | this parameter is checked only at the beginning of a cycle. | 19 | this parameter is checked only at the beginning of a cycle. |
20 | So if you are 30 seconds into a 70-second stall, setting this | 20 | So if you are 10 seconds into a 40-second stall, setting this |
21 | sysfs parameter to (say) five will shorten the timeout for the | 21 | sysfs parameter to (say) five will shorten the timeout for the |
22 | -next- stall, or the following warning for the current stall | 22 | -next- stall, or the following warning for the current stall |
23 | (assuming the stall lasts long enough). It will not affect the | 23 | (assuming the stall lasts long enough). It will not affect the |
@@ -32,7 +32,7 @@ CONFIG_RCU_CPU_STALL_VERBOSE | |||
32 | also dump the stacks of any tasks that are blocking the current | 32 | also dump the stacks of any tasks that are blocking the current |
33 | RCU-preempt grace period. | 33 | RCU-preempt grace period. |
34 | 34 | ||
35 | RCU_CPU_STALL_INFO | 35 | CONFIG_RCU_CPU_STALL_INFO |
36 | 36 | ||
37 | This kernel configuration parameter causes the stall warning to | 37 | This kernel configuration parameter causes the stall warning to |
38 | print out additional per-CPU diagnostic information, including | 38 | print out additional per-CPU diagnostic information, including |
@@ -43,7 +43,8 @@ RCU_STALL_DELAY_DELTA | |||
43 | Although the lockdep facility is extremely useful, it does add | 43 | Although the lockdep facility is extremely useful, it does add |
44 | some overhead. Therefore, under CONFIG_PROVE_RCU, the | 44 | some overhead. Therefore, under CONFIG_PROVE_RCU, the |
45 | RCU_STALL_DELAY_DELTA macro allows five extra seconds before | 45 | RCU_STALL_DELAY_DELTA macro allows five extra seconds before |
46 | giving an RCU CPU stall warning message. | 46 | giving an RCU CPU stall warning message. (This is a cpp |
47 | macro, not a kernel configuration parameter.) | ||
47 | 48 | ||
48 | RCU_STALL_RAT_DELAY | 49 | RCU_STALL_RAT_DELAY |
49 | 50 | ||
@@ -52,7 +53,8 @@ RCU_STALL_RAT_DELAY | |||
52 | However, if the offending CPU does not detect its own stall in | 53 | However, if the offending CPU does not detect its own stall in |
53 | the number of jiffies specified by RCU_STALL_RAT_DELAY, then | 54 | the number of jiffies specified by RCU_STALL_RAT_DELAY, then |
54 | some other CPU will complain. This delay is normally set to | 55 | some other CPU will complain. This delay is normally set to |
55 | two jiffies. | 56 | two jiffies. (This is a cpp macro, not a kernel configuration |
57 | parameter.) | ||
56 | 58 | ||
57 | When a CPU detects that it is stalling, it will print a message similar | 59 | When a CPU detects that it is stalling, it will print a message similar |
58 | to the following: | 60 | to the following: |
@@ -86,7 +88,12 @@ printing, there will be a spurious stall-warning message: | |||
86 | 88 | ||
87 | INFO: rcu_bh_state detected stalls on CPUs/tasks: { } (detected by 4, 2502 jiffies) | 89 | INFO: rcu_bh_state detected stalls on CPUs/tasks: { } (detected by 4, 2502 jiffies) |
88 | 90 | ||
89 | This is rare, but does happen from time to time in real life. | 91 | This is rare, but does happen from time to time in real life. It is also |
92 | possible for a zero-jiffy stall to be flagged in this case, depending | ||
93 | on how the stall warning and the grace-period initialization happen to | ||
94 | interact. Please note that it is not possible to entirely eliminate this | ||
95 | sort of false positive without resorting to things like stop_machine(), | ||
96 | which is overkill for this sort of problem. | ||
90 | 97 | ||
91 | If the CONFIG_RCU_CPU_STALL_INFO kernel configuration parameter is set, | 98 | If the CONFIG_RCU_CPU_STALL_INFO kernel configuration parameter is set, |
92 | more information is printed with the stall-warning message, for example: | 99 | more information is printed with the stall-warning message, for example: |
@@ -216,4 +223,5 @@ that portion of the stack which remains the same from trace to trace. | |||
216 | If you can reliably trigger the stall, ftrace can be quite helpful. | 223 | If you can reliably trigger the stall, ftrace can be quite helpful. |
217 | 224 | ||
218 | RCU bugs can often be debugged with the help of CONFIG_RCU_TRACE | 225 | RCU bugs can often be debugged with the help of CONFIG_RCU_TRACE |
219 | and with RCU's event tracing. | 226 | and with RCU's event tracing. For information on RCU's event tracing, |
227 | see include/trace/events/rcu.h. | ||