diff options
author | Paul E. McKenney <paul.mckenney@linaro.org> | 2010-11-04 17:31:19 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-11-30 01:01:56 -0500 |
commit | 8e79e1f9615b83d1e1d26b328d1b776111ca0cf7 (patch) | |
tree | 9c201ebc3f18ed8aec432174edb86bd87d420770 /Documentation/RCU | |
parent | 9e571a82f0cb205a65a0ea41657f19f22b7fabb8 (diff) |
rcu: document TINY_RCU and TINY_PREEMPT_RCU tracing.
Add the required verbiage to Documentation/RCU/trace.txt.
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'Documentation/RCU')
-rw-r--r-- | Documentation/RCU/trace.txt | 132 |
1 files changed, 124 insertions, 8 deletions
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt index a851118775d8..ff6d3f10c82f 100644 --- a/Documentation/RCU/trace.txt +++ b/Documentation/RCU/trace.txt | |||
@@ -1,18 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE debugfs Files and Formats | 1 | CONFIG_RCU_TRACE debugfs Files and Formats |
2 | 2 | ||
3 | 3 | ||
4 | The rcutree implementation of RCU provides debugfs trace output that | 4 | The rcutree and rcutiny implementations of RCU provide debugfs trace |
5 | summarizes counters and state. This information is useful for debugging | 5 | output that summarizes counters and state. This information is useful for |
6 | RCU itself, and can sometimes also help to debug abuses of RCU. | 6 | debugging RCU itself, and can sometimes also help to debug abuses of RCU. |
7 | The following sections describe the debugfs files and formats. | 7 | The following sections describe the debugfs files and formats, first |
8 | for rcutree and next for rcutiny. | ||
8 | 9 | ||
9 | 10 | ||
10 | Hierarchical RCU debugfs Files and Formats | 11 | CONFIG_TREE_RCU and CONFIG_TREE_PREEMPT_RCU debugfs Files and Formats |
11 | 12 | ||
12 | This implementation of RCU provides three debugfs files under the | 13 | These implementations of RCU provides five debugfs files under the |
13 | top-level directory RCU: rcu/rcudata (which displays fields in struct | 14 | top-level directory RCU: rcu/rcudata (which displays fields in struct |
14 | rcu_data), rcu/rcugp (which displays grace-period counters), and | 15 | rcu_data), rcu/rcudata.csv (which is a .csv spreadsheet version of |
15 | rcu/rcuhier (which displays the struct rcu_node hierarchy). | 16 | rcu/rcudata), rcu/rcugp (which displays grace-period counters), |
17 | rcu/rcuhier (which displays the struct rcu_node hierarchy), and | ||
18 | rcu/rcu_pending (which displays counts of the reasons that the | ||
19 | rcu_pending() function decided that there was core RCU work to do). | ||
16 | 20 | ||
17 | The output of "cat rcu/rcudata" looks as follows: | 21 | The output of "cat rcu/rcudata" looks as follows: |
18 | 22 | ||
@@ -326,3 +330,115 @@ o "nn" is the number of times that this CPU needed nothing. Alert | |||
326 | readers will note that the rcu "nn" number for a given CPU very | 330 | readers will note that the rcu "nn" number for a given CPU very |
327 | closely matches the rcu_bh "np" number for that same CPU. This | 331 | closely matches the rcu_bh "np" number for that same CPU. This |
328 | is due to short-circuit evaluation in rcu_pending(). | 332 | is due to short-circuit evaluation in rcu_pending(). |
333 | |||
334 | |||
335 | CONFIG_TINY_RCU and CONFIG_TINY_PREEMPT_RCU debugfs Files and Formats | ||
336 | |||
337 | These implementations of RCU provides a single debugfs file under the | ||
338 | top-level directory RCU, namely rcu/rcudata, which displays fields in | ||
339 | rcu_bh_ctrlblk, rcu_sched_ctrlblk and, for CONFIG_TINY_PREEMPT_RCU, | ||
340 | rcu_preempt_ctrlblk. | ||
341 | |||
342 | The output of "cat rcu/rcudata" is as follows: | ||
343 | |||
344 | rcu_preempt: qlen=24 gp=1097669 g197/p197/c197 tasks=... | ||
345 | ttb=. btg=no ntb=184 neb=0 nnb=183 j=01f7 bt=0274 | ||
346 | normal balk: nt=1097669 gt=0 bt=371 b=0 ny=25073378 nos=0 | ||
347 | exp balk: bt=0 nos=0 | ||
348 | rcu_sched: qlen: 0 | ||
349 | rcu_bh: qlen: 0 | ||
350 | |||
351 | This is split into rcu_preempt, rcu_sched, and rcu_bh sections, with the | ||
352 | rcu_preempt section appearing only in CONFIG_TINY_PREEMPT_RCU builds. | ||
353 | The last three lines of the rcu_preempt section appear only in | ||
354 | CONFIG_RCU_BOOST kernel builds. The fields are as follows: | ||
355 | |||
356 | o "qlen" is the number of RCU callbacks currently waiting either | ||
357 | for an RCU grace period or waiting to be invoked. This is the | ||
358 | only field present for rcu_sched and rcu_bh, due to the | ||
359 | short-circuiting of grace period in those two cases. | ||
360 | |||
361 | o "gp" is the number of grace periods that have completed. | ||
362 | |||
363 | o "g197/p197/c197" displays the grace-period state, with the | ||
364 | "g" number being the number of grace periods that have started | ||
365 | (mod 256), the "p" number being the number of grace periods | ||
366 | that the CPU has responded to (also mod 256), and the "c" | ||
367 | number being the number of grace periods that have completed | ||
368 | (once again mode 256). | ||
369 | |||
370 | Why have both "gp" and "g"? Because the data flowing into | ||
371 | "gp" is only present in a CONFIG_RCU_TRACE kernel. | ||
372 | |||
373 | o "tasks" is a set of bits. The first bit is "T" if there are | ||
374 | currently tasks that have recently blocked within an RCU | ||
375 | read-side critical section, the second bit is "N" if any of the | ||
376 | aforementioned tasks are blocking the current RCU grace period, | ||
377 | and the third bit is "E" if any of the aforementioned tasks are | ||
378 | blocking the current expedited grace period. Each bit is "." | ||
379 | if the corresponding condition does not hold. | ||
380 | |||
381 | o "ttb" is a single bit. It is "B" if any of the blocked tasks | ||
382 | need to be priority boosted and "." otherwise. | ||
383 | |||
384 | o "btg" indicates whether boosting has been carried out during | ||
385 | the current grace period, with "exp" indicating that boosting | ||
386 | is in progress for an expedited grace period, "no" indicating | ||
387 | that boosting has not yet started for a normal grace period, | ||
388 | "begun" indicating that boosting has bebug for a normal grace | ||
389 | period, and "done" indicating that boosting has completed for | ||
390 | a normal grace period. | ||
391 | |||
392 | o "ntb" is the total number of tasks subjected to RCU priority boosting | ||
393 | periods since boot. | ||
394 | |||
395 | o "neb" is the number of expedited grace periods that have had | ||
396 | to resort to RCU priority boosting since boot. | ||
397 | |||
398 | o "nnb" is the number of normal grace periods that have had | ||
399 | to resort to RCU priority boosting since boot. | ||
400 | |||
401 | o "j" is the low-order 12 bits of the jiffies counter in hexadecimal. | ||
402 | |||
403 | o "bt" is the low-order 12 bits of the value that the jiffies counter | ||
404 | will have at the next time that boosting is scheduled to begin. | ||
405 | |||
406 | o In the line beginning with "normal balk", the fields are as follows: | ||
407 | |||
408 | o "nt" is the number of times that the system balked from | ||
409 | boosting because there were no blocked tasks to boost. | ||
410 | Note that the system will balk from boosting even if the | ||
411 | grace period is overdue when the currently running task | ||
412 | is looping within an RCU read-side critical section. | ||
413 | There is no point in boosting in this case, because | ||
414 | boosting a running task won't make it run any faster. | ||
415 | |||
416 | o "gt" is the number of times that the system balked | ||
417 | from boosting because, although there were blocked tasks, | ||
418 | none of them were preventing the current grace period | ||
419 | from completing. | ||
420 | |||
421 | o "bt" is the number of times that the system balked | ||
422 | from boosting because boosting was already in progress. | ||
423 | |||
424 | o "b" is the number of times that the system balked from | ||
425 | boosting because boosting had already completed for | ||
426 | the grace period in question. | ||
427 | |||
428 | o "ny" is the number of times that the system balked from | ||
429 | boosting because it was not yet time to start boosting | ||
430 | the grace period in question. | ||
431 | |||
432 | o "nos" is the number of times that the system balked from | ||
433 | boosting for inexplicable ("not otherwise specified") | ||
434 | reasons. This can actually happen due to races involving | ||
435 | increments of the jiffies counter. | ||
436 | |||
437 | o In the line beginning with "exp balk", the fields are as follows: | ||
438 | |||
439 | o "bt" is the number of times that the system balked from | ||
440 | boosting because there were no blocked tasks to boost. | ||
441 | |||
442 | o "nos" is the number of times that the system balked from | ||
443 | boosting for inexplicable ("not otherwise specified") | ||
444 | reasons. | ||