aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/RCU/trace.txt
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2010-11-04 17:31:19 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2010-11-30 01:01:56 -0500
commit8e79e1f9615b83d1e1d26b328d1b776111ca0cf7 (patch)
tree9c201ebc3f18ed8aec432174edb86bd87d420770 /Documentation/RCU/trace.txt
parent9e571a82f0cb205a65a0ea41657f19f22b7fabb8 (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/trace.txt')
-rw-r--r--Documentation/RCU/trace.txt132
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 @@
1CONFIG_RCU_TRACE debugfs Files and Formats 1CONFIG_RCU_TRACE debugfs Files and Formats
2 2
3 3
4The rcutree implementation of RCU provides debugfs trace output that 4The rcutree and rcutiny implementations of RCU provide debugfs trace
5summarizes counters and state. This information is useful for debugging 5output that summarizes counters and state. This information is useful for
6RCU itself, and can sometimes also help to debug abuses of RCU. 6debugging RCU itself, and can sometimes also help to debug abuses of RCU.
7The following sections describe the debugfs files and formats. 7The following sections describe the debugfs files and formats, first
8for rcutree and next for rcutiny.
8 9
9 10
10Hierarchical RCU debugfs Files and Formats 11CONFIG_TREE_RCU and CONFIG_TREE_PREEMPT_RCU debugfs Files and Formats
11 12
12This implementation of RCU provides three debugfs files under the 13These implementations of RCU provides five debugfs files under the
13top-level directory RCU: rcu/rcudata (which displays fields in struct 14top-level directory RCU: rcu/rcudata (which displays fields in struct
14rcu_data), rcu/rcugp (which displays grace-period counters), and 15rcu_data), rcu/rcudata.csv (which is a .csv spreadsheet version of
15rcu/rcuhier (which displays the struct rcu_node hierarchy). 16rcu/rcudata), rcu/rcugp (which displays grace-period counters),
17rcu/rcuhier (which displays the struct rcu_node hierarchy), and
18rcu/rcu_pending (which displays counts of the reasons that the
19rcu_pending() function decided that there was core RCU work to do).
16 20
17The output of "cat rcu/rcudata" looks as follows: 21The 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
335CONFIG_TINY_RCU and CONFIG_TINY_PREEMPT_RCU debugfs Files and Formats
336
337These implementations of RCU provides a single debugfs file under the
338top-level directory RCU, namely rcu/rcudata, which displays fields in
339rcu_bh_ctrlblk, rcu_sched_ctrlblk and, for CONFIG_TINY_PREEMPT_RCU,
340rcu_preempt_ctrlblk.
341
342The output of "cat rcu/rcudata" is as follows:
343
344rcu_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
348rcu_sched: qlen: 0
349rcu_bh: qlen: 0
350
351This is split into rcu_preempt, rcu_sched, and rcu_bh sections, with the
352rcu_preempt section appearing only in CONFIG_TINY_PREEMPT_RCU builds.
353The last three lines of the rcu_preempt section appear only in
354CONFIG_RCU_BOOST kernel builds. The fields are as follows:
355
356o "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
361o "gp" is the number of grace periods that have completed.
362
363o "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
373o "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
381o "ttb" is a single bit. It is "B" if any of the blocked tasks
382 need to be priority boosted and "." otherwise.
383
384o "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
392o "ntb" is the total number of tasks subjected to RCU priority boosting
393 periods since boot.
394
395o "neb" is the number of expedited grace periods that have had
396 to resort to RCU priority boosting since boot.
397
398o "nnb" is the number of normal grace periods that have had
399 to resort to RCU priority boosting since boot.
400
401o "j" is the low-order 12 bits of the jiffies counter in hexadecimal.
402
403o "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
406o 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
437o 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.