diff options
Diffstat (limited to 'Documentation/RCU/stallwarn.txt')
-rw-r--r-- | Documentation/RCU/stallwarn.txt | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt index 68fe3ad27015..ef5a2fd4ff70 100644 --- a/Documentation/RCU/stallwarn.txt +++ b/Documentation/RCU/stallwarn.txt | |||
@@ -56,8 +56,20 @@ RCU_STALL_RAT_DELAY | |||
56 | two jiffies. (This is a cpp macro, not a kernel configuration | 56 | two jiffies. (This is a cpp macro, not a kernel configuration |
57 | parameter.) | 57 | parameter.) |
58 | 58 | ||
59 | When a CPU detects that it is stalling, it will print a message similar | 59 | rcupdate.rcu_task_stall_timeout |
60 | to the following: | 60 | |
61 | This boot/sysfs parameter controls the RCU-tasks stall warning | ||
62 | interval. A value of zero or less suppresses RCU-tasks stall | ||
63 | warnings. A positive value sets the stall-warning interval | ||
64 | in jiffies. An RCU-tasks stall warning starts wtih the line: | ||
65 | |||
66 | INFO: rcu_tasks detected stalls on tasks: | ||
67 | |||
68 | And continues with the output of sched_show_task() for each | ||
69 | task stalling the current RCU-tasks grace period. | ||
70 | |||
71 | For non-RCU-tasks flavors of RCU, when a CPU detects that it is stalling, | ||
72 | it will print a message similar to the following: | ||
61 | 73 | ||
62 | INFO: rcu_sched_state detected stall on CPU 5 (t=2500 jiffies) | 74 | INFO: rcu_sched_state detected stall on CPU 5 (t=2500 jiffies) |
63 | 75 | ||
@@ -174,8 +186,12 @@ o A CPU looping with preemption disabled. This condition can | |||
174 | o A CPU looping with bottom halves disabled. This condition can | 186 | o A CPU looping with bottom halves disabled. This condition can |
175 | result in RCU-sched and RCU-bh stalls. | 187 | result in RCU-sched and RCU-bh stalls. |
176 | 188 | ||
177 | o For !CONFIG_PREEMPT kernels, a CPU looping anywhere in the kernel | 189 | o For !CONFIG_PREEMPT kernels, a CPU looping anywhere in the |
178 | without invoking schedule(). | 190 | kernel without invoking schedule(). Note that cond_resched() |
191 | does not necessarily prevent RCU CPU stall warnings. Therefore, | ||
192 | if the looping in the kernel is really expected and desirable | ||
193 | behavior, you might need to replace some of the cond_resched() | ||
194 | calls with calls to cond_resched_rcu_qs(). | ||
179 | 195 | ||
180 | o A CPU-bound real-time task in a CONFIG_PREEMPT kernel, which might | 196 | o A CPU-bound real-time task in a CONFIG_PREEMPT kernel, which might |
181 | happen to preempt a low-priority task in the middle of an RCU | 197 | happen to preempt a low-priority task in the middle of an RCU |
@@ -208,11 +224,10 @@ o A hardware failure. This is quite unlikely, but has occurred | |||
208 | This resulted in a series of RCU CPU stall warnings, eventually | 224 | This resulted in a series of RCU CPU stall warnings, eventually |
209 | leading the realization that the CPU had failed. | 225 | leading the realization that the CPU had failed. |
210 | 226 | ||
211 | The RCU, RCU-sched, and RCU-bh implementations have CPU stall warning. | 227 | The RCU, RCU-sched, RCU-bh, and RCU-tasks implementations have CPU stall |
212 | SRCU does not have its own CPU stall warnings, but its calls to | 228 | warning. Note that SRCU does -not- have CPU stall warnings. Please note |
213 | synchronize_sched() will result in RCU-sched detecting RCU-sched-related | 229 | that RCU only detects CPU stalls when there is a grace period in progress. |
214 | CPU stalls. Please note that RCU only detects CPU stalls when there is | 230 | No grace period, no CPU stall warnings. |
215 | a grace period in progress. No grace period, no CPU stall warnings. | ||
216 | 231 | ||
217 | To diagnose the cause of the stall, inspect the stack traces. | 232 | To diagnose the cause of the stall, inspect the stack traces. |
218 | The offending function will usually be near the top of the stack. | 233 | The offending function will usually be near the top of the stack. |