summaryrefslogtreecommitdiffstats
path: root/Documentation/RCU
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2012-10-31 16:00:15 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-11-16 12:54:02 -0500
commit40e80c469f1b52a68e09da3808a1228cf9947fa7 (patch)
tree098aa44696c2d348255f6370485477cffae57ec7 /Documentation/RCU
parenta4d611fdca0d696f9b8ffb007a119944ed5275fa (diff)
rcu: Update documentation for TREE_RCU debugfs tracing
This commit updates the tracing documentation to reflect the new format that has per-RCU-flavor directories. 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.txt365
1 files changed, 182 insertions, 183 deletions
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
index 672d19083252..79ce9891a8c7 100644
--- a/Documentation/RCU/trace.txt
+++ b/Documentation/RCU/trace.txt
@@ -10,51 +10,61 @@ for rcutree and next for rcutiny.
10 10
11CONFIG_TREE_RCU and CONFIG_TREE_PREEMPT_RCU debugfs Files and Formats 11CONFIG_TREE_RCU and CONFIG_TREE_PREEMPT_RCU debugfs Files and Formats
12 12
13These implementations of RCU provides several debugfs files under the 13These implementations of RCU provide several debugfs directories under the
14top-level directory "rcu": 14top-level directory "rcu":
15 15
16rcu/rcudata: 16rcu/rcu_bh
17rcu/rcu_preempt
18rcu/rcu_sched
19
20Each directory contains files for the corresponding flavor of RCU.
21Note that rcu/rcu_preempt is only present for CONFIG_TREE_PREEMPT_RCU.
22For CONFIG_TREE_RCU, the RCU flavor maps onto the RCU-sched flavor,
23so that activity for both appears in rcu/rcu_sched.
24
25In addition, the following file appears in the top-level directory:
26rcu/rcutorture. This file displays rcutorture test progress. The output
27of "cat rcu/rcutorture" looks as follows:
28
29rcutorture test sequence: 0 (test in progress)
30rcutorture update version number: 615
31
32The first line shows the number of rcutorture tests that have completed
33since boot. If a test is currently running, the "(test in progress)"
34string will appear as shown above. The second line shows the number of
35update cycles that the current test has started, or zero if there is
36no test in progress.
37
38
39Within each flavor directory (rcu/rcu_bh, rcu/rcu_sched, and possibly
40also rcu/rcu_preempt) the following files will be present:
41
42rcudata:
17 Displays fields in struct rcu_data. 43 Displays fields in struct rcu_data.
18rcu/rcudata.csv: 44rcugp:
19 Comma-separated values spreadsheet version of rcudata.
20rcu/rcugp:
21 Displays grace-period counters. 45 Displays grace-period counters.
22rcu/rcuhier: 46rcuhier:
23 Displays the struct rcu_node hierarchy. 47 Displays the struct rcu_node hierarchy.
24rcu/rcu_pending: 48rcu_pending:
25 Displays counts of the reasons rcu_pending() decided that RCU had 49 Displays counts of the reasons rcu_pending() decided that RCU had
26 work to do. 50 work to do.
27rcu/rcutorture: 51rcuboost:
28 Displays rcutorture test progress.
29rcu/rcuboost:
30 Displays RCU boosting statistics. Only present if 52 Displays RCU boosting statistics. Only present if
31 CONFIG_RCU_BOOST=y. 53 CONFIG_RCU_BOOST=y.
32 54
33The output of "cat rcu/rcudata" looks as follows: 55The output of "cat rcu/rcu_preempt/rcudata" looks as follows:
34 56
35rcu_sched: 57 0!c=30455 g=30456 pq=1 qp=1 dt=126535/140000000000000/0 df=2002 of=4 ql=0/0 qs=N... b=10 ci=74572 nci=0 co=1131 ca=716
36 0 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=545/1/0 df=50 of=0 ql=163 qs=NRW. kt=0/W/0 ktl=ebc3 b=10 ci=153737 co=0 ca=0 58 1!c=30719 g=30720 pq=1 qp=0 dt=132007/140000000000000/0 df=1874 of=10 ql=0/0 qs=N... b=10 ci=123209 nci=0 co=685 ca=982
37 1 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=967/1/0 df=58 of=0 ql=634 qs=NRW. kt=0/W/1 ktl=58c b=10 ci=191037 co=0 ca=0 59 2!c=30150 g=30151 pq=1 qp=1 dt=138537/140000000000000/0 df=1707 of=8 ql=0/0 qs=N... b=10 ci=80132 nci=0 co=1328 ca=1458
38 2 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1081/1/0 df=175 of=0 ql=74 qs=N.W. kt=0/W/2 ktl=da94 b=10 ci=75991 co=0 ca=0 60 3 c=31249 g=31250 pq=1 qp=0 dt=107255/140000000000000/0 df=1749 of=6 ql=0/450 qs=NRW. b=10 ci=151700 nci=0 co=509 ca=622
39 3 c=20942 g=20943 pq=1 pgp=20942 qp=1 dt=1846/0/0 df=404 of=0 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=72261 co=0 ca=0 61 4!c=29502 g=29503 pq=1 qp=1 dt=83647/140000000000000/0 df=965 of=5 ql=0/0 qs=N... b=10 ci=65643 nci=0 co=1373 ca=1521
40 4 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=369/1/0 df=83 of=0 ql=48 qs=N.W. kt=0/W/4 ktl=e0e7 b=10 ci=128365 co=0 ca=0 62 5 c=31201 g=31202 pq=1 qp=1 dt=70422/0/0 df=535 of=7 ql=0/0 qs=.... b=10 ci=58500 nci=0 co=764 ca=698
41 5 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=381/1/0 df=64 of=0 ql=169 qs=NRW. kt=0/W/5 ktl=fb2f b=10 ci=164360 co=0 ca=0 63 6!c=30253 g=30254 pq=1 qp=1 dt=95363/140000000000000/0 df=780 of=5 ql=0/0 qs=N... b=10 ci=100607 nci=0 co=1414 ca=1353
42 6 c=20972 g=20973 pq=1 pgp=20973 qp=0 dt=1037/1/0 df=183 of=0 ql=62 qs=N.W. kt=0/W/6 ktl=d2ad b=10 ci=65663 co=0 ca=0 64 7 c=31178 g=31178 pq=1 qp=0 dt=91536/0/0 df=547 of=4 ql=0/0 qs=.... b=10 ci=109819 nci=0 co=1115 ca=969
43 7 c=20897 g=20897 pq=1 pgp=20896 qp=0 dt=1572/0/0 df=382 of=0 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=75006 co=0 ca=0 65
44rcu_bh: 66This file has one line per CPU, or eight for this 8-CPU system.
45 0 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=545/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/0 ktl=ebc3 b=10 ci=0 co=0 ca=0 67The fields are as follows:
46 1 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=967/1/0 df=3 of=0 ql=0 qs=.... kt=0/W/1 ktl=58c b=10 ci=151 co=0 ca=0
47 2 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1081/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/2 ktl=da94 b=10 ci=0 co=0 ca=0
48 3 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1846/0/0 df=8 of=0 ql=0 qs=.... kt=0/W/3 ktl=d1cd b=10 ci=0 co=0 ca=0
49 4 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=369/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/4 ktl=e0e7 b=10 ci=0 co=0 ca=0
50 5 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=381/1/0 df=4 of=0 ql=0 qs=.... kt=0/W/5 ktl=fb2f b=10 ci=0 co=0 ca=0
51 6 c=1480 g=1480 pq=1 pgp=1480 qp=0 dt=1037/1/0 df=6 of=0 ql=0 qs=.... kt=0/W/6 ktl=d2ad b=10 ci=0 co=0 ca=0
52 7 c=1474 g=1474 pq=1 pgp=1473 qp=0 dt=1572/0/0 df=8 of=0 ql=0 qs=.... kt=0/W/7 ktl=cf15 b=10 ci=0 co=0 ca=0
53
54The first section lists the rcu_data structures for rcu_sched, the second
55for rcu_bh. Note that CONFIG_TREE_PREEMPT_RCU kernels will have an
56additional section for rcu_preempt. Each section has one line per CPU,
57or eight for this 8-CPU system. The fields are as follows:
58 68
59o The number at the beginning of each line is the CPU number. 69o The number at the beginning of each line is the CPU number.
60 CPUs numbers followed by an exclamation mark are offline, 70 CPUs numbers followed by an exclamation mark are offline,
@@ -64,11 +74,13 @@ o The number at the beginning of each line is the CPU number.
64 substantially larger than the number of actual CPUs. 74 substantially larger than the number of actual CPUs.
65 75
66o "c" is the count of grace periods that this CPU believes have 76o "c" is the count of grace periods that this CPU believes have
67 completed. Offlined CPUs and CPUs in dynticks idle mode may 77 completed. Offlined CPUs and CPUs in dynticks idle mode may lag
68 lag quite a ways behind, for example, CPU 6 under "rcu_sched" 78 quite a ways behind, for example, CPU 4 under "rcu_sched" above,
69 above, which has been offline through not quite 40,000 RCU grace 79 which has been offline through 16 RCU grace periods. It is not
70 periods. It is not unusual to see CPUs lagging by thousands of 80 unusual to see offline CPUs lagging by thousands of grace periods.
71 grace periods. 81 Note that although the grace-period number is an unsigned long,
82 it is printed out as a signed long to allow more human-friendly
83 representation near boot time.
72 84
73o "g" is the count of grace periods that this CPU believes have 85o "g" is the count of grace periods that this CPU believes have
74 started. Again, offlined CPUs and CPUs in dynticks idle mode 86 started. Again, offlined CPUs and CPUs in dynticks idle mode
@@ -84,30 +96,25 @@ o "pq" indicates that this CPU has passed through a quiescent state
84 CPU has not yet reported that fact, (2) some other CPU has not 96 CPU has not yet reported that fact, (2) some other CPU has not
85 yet reported for this grace period, or (3) both. 97 yet reported for this grace period, or (3) both.
86 98
87o "pgp" indicates which grace period the last-observed quiescent
88 state for this CPU corresponds to. This is important for handling
89 the race between CPU 0 reporting an extended dynticks-idle
90 quiescent state for CPU 1 and CPU 1 suddenly waking up and
91 reporting its own quiescent state. If CPU 1 was the last CPU
92 for the current grace period, then the CPU that loses this race
93 will attempt to incorrectly mark CPU 1 as having checked in for
94 the next grace period!
95
96o "qp" indicates that RCU still expects a quiescent state from 99o "qp" indicates that RCU still expects a quiescent state from
97 this CPU. Offlined CPUs and CPUs in dyntick idle mode might 100 this CPU. Offlined CPUs and CPUs in dyntick idle mode might
98 well have qp=1, which is OK: RCU is still ignoring them. 101 well have qp=1, which is OK: RCU is still ignoring them.
99 102
100o "dt" is the current value of the dyntick counter that is incremented 103o "dt" is the current value of the dyntick counter that is incremented
101 when entering or leaving dynticks idle state, either by the 104 when entering or leaving idle, either due to a context switch or
102 scheduler or by irq. This number is even if the CPU is in 105 due to an interrupt. This number is even if the CPU is in idle
103 dyntick idle mode and odd otherwise. The number after the first 106 from RCU's viewpoint and odd otherwise. The number after the
104 "/" is the interrupt nesting depth when in dyntick-idle state, 107 first "/" is the interrupt nesting depth when in idle state,
105 or one greater than the interrupt-nesting depth otherwise. 108 or a large number added to the interrupt-nesting depth when
106 The number after the second "/" is the NMI nesting depth. 109 running a non-idle task. Some architectures do not accurately
110 count interrupt nesting when running in non-idle kernel context,
111 which can result in interesting anomalies such as negative
112 interrupt-nesting levels. The number after the second "/"
113 is the NMI nesting depth.
107 114
108o "df" is the number of times that some other CPU has forced a 115o "df" is the number of times that some other CPU has forced a
109 quiescent state on behalf of this CPU due to this CPU being in 116 quiescent state on behalf of this CPU due to this CPU being in
110 dynticks-idle state. 117 idle state.
111 118
112o "of" is the number of times that some other CPU has forced a 119o "of" is the number of times that some other CPU has forced a
113 quiescent state on behalf of this CPU due to this CPU being 120 quiescent state on behalf of this CPU due to this CPU being
@@ -120,9 +127,13 @@ o "of" is the number of times that some other CPU has forced a
120 error, so it makes sense to err conservatively. 127 error, so it makes sense to err conservatively.
121 128
122o "ql" is the number of RCU callbacks currently residing on 129o "ql" is the number of RCU callbacks currently residing on
123 this CPU. This is the total number of callbacks, regardless 130 this CPU. The first number is the number of "lazy" callbacks
124 of what state they are in (new, waiting for grace period to 131 that are known to RCU to only be freeing memory, and the number
125 start, waiting for grace period to end, ready to invoke). 132 after the "/" is the total number of callbacks, lazy or not.
133 These counters count callbacks regardless of what phase of
134 grace-period processing that they are in (new, waiting for
135 grace period to start, waiting for grace period to end, ready
136 to invoke).
126 137
127o "qs" gives an indication of the state of the callback queue 138o "qs" gives an indication of the state of the callback queue
128 with four characters: 139 with four characters:
@@ -150,6 +161,43 @@ o "qs" gives an indication of the state of the callback queue
150 If there are no callbacks in a given one of the above states, 161 If there are no callbacks in a given one of the above states,
151 the corresponding character is replaced by ".". 162 the corresponding character is replaced by ".".
152 163
164o "b" is the batch limit for this CPU. If more than this number
165 of RCU callbacks is ready to invoke, then the remainder will
166 be deferred.
167
168o "ci" is the number of RCU callbacks that have been invoked for
169 this CPU. Note that ci+nci+ql is the number of callbacks that have
170 been registered in absence of CPU-hotplug activity.
171
172o "nci" is the number of RCU callbacks that have been offloaded from
173 this CPU. This will always be zero unless the kernel was built
174 with CONFIG_RCU_NOCB_CPU=y and the "rcu_nocbs=" kernel boot
175 parameter was specified.
176
177o "co" is the number of RCU callbacks that have been orphaned due to
178 this CPU going offline. These orphaned callbacks have been moved
179 to an arbitrarily chosen online CPU.
180
181o "ca" is the number of RCU callbacks that have been adopted by this
182 CPU due to other CPUs going offline. Note that ci+co-ca+ql is
183 the number of RCU callbacks registered on this CPU.
184
185
186Kernels compiled with CONFIG_RCU_BOOST=y display the following from
187/debug/rcu/rcu_preempt/rcudata:
188
189 0!c=12865 g=12866 pq=1 qp=1 dt=83113/140000000000000/0 df=288 of=11 ql=0/0 qs=N... kt=0/O ktl=944 b=10 ci=60709 nci=0 co=748 ca=871
190 1 c=14407 g=14408 pq=1 qp=0 dt=100679/140000000000000/0 df=378 of=7 ql=0/119 qs=NRW. kt=0/W ktl=9b6 b=10 ci=109740 nci=0 co=589 ca=485
191 2 c=14407 g=14408 pq=1 qp=0 dt=105486/0/0 df=90 of=9 ql=0/89 qs=NRW. kt=0/W ktl=c0c b=10 ci=83113 nci=0 co=533 ca=490
192 3 c=14407 g=14408 pq=1 qp=0 dt=107138/0/0 df=142 of=8 ql=0/188 qs=NRW. kt=0/W ktl=b96 b=10 ci=121114 nci=0 co=426 ca=290
193 4 c=14405 g=14406 pq=1 qp=1 dt=50238/0/0 df=706 of=7 ql=0/0 qs=.... kt=0/W ktl=812 b=10 ci=34929 nci=0 co=643 ca=114
194 5!c=14168 g=14169 pq=1 qp=0 dt=45465/140000000000000/0 df=161 of=11 ql=0/0 qs=N... kt=0/O ktl=b4d b=10 ci=47712 nci=0 co=677 ca=722
195 6 c=14404 g=14405 pq=1 qp=0 dt=59454/0/0 df=94 of=6 ql=0/0 qs=.... kt=0/W ktl=e57 b=10 ci=55597 nci=0 co=701 ca=811
196 7 c=14407 g=14408 pq=1 qp=1 dt=68850/0/0 df=31 of=8 ql=0/0 qs=.... kt=0/W ktl=14bd b=10 ci=77475 nci=0 co=508 ca=1042
197
198This is similar to the output discussed above, but contains the following
199additional fields:
200
153o "kt" is the per-CPU kernel-thread state. The digit preceding 201o "kt" is the per-CPU kernel-thread state. The digit preceding
154 the first slash is zero if there is no work pending and 1 202 the first slash is zero if there is no work pending and 1
155 otherwise. The character between the first pair of slashes is 203 otherwise. The character between the first pair of slashes is
@@ -184,35 +232,12 @@ o "ktl" is the low-order 16 bits (in hexadecimal) of the count of
184 232
185 This field is displayed only for CONFIG_RCU_BOOST kernels. 233 This field is displayed only for CONFIG_RCU_BOOST kernels.
186 234
187o "b" is the batch limit for this CPU. If more than this number
188 of RCU callbacks is ready to invoke, then the remainder will
189 be deferred.
190
191o "ci" is the number of RCU callbacks that have been invoked for
192 this CPU. Note that ci+ql is the number of callbacks that have
193 been registered in absence of CPU-hotplug activity.
194
195o "co" is the number of RCU callbacks that have been orphaned due to
196 this CPU going offline. These orphaned callbacks have been moved
197 to an arbitrarily chosen online CPU.
198
199o "ca" is the number of RCU callbacks that have been adopted due to
200 other CPUs going offline. Note that ci+co-ca+ql is the number of
201 RCU callbacks registered on this CPU.
202 235
203There is also an rcu/rcudata.csv file with the same information in 236The output of "cat rcu/rcu_preempt/rcugp" looks as follows:
204comma-separated-variable spreadsheet format.
205 237
238completed=31249 gpnum=31250 age=1 max=18
206 239
207The output of "cat rcu/rcugp" looks as follows: 240These fields are taken from the rcu_state structure, and are as follows:
208
209rcu_sched: completed=33062 gpnum=33063
210rcu_bh: completed=464 gpnum=464
211
212Again, this output is for both "rcu_sched" and "rcu_bh". Note that
213kernels built with CONFIG_TREE_PREEMPT_RCU will have an additional
214"rcu_preempt" line. The fields are taken from the rcu_state structure,
215and are as follows:
216 241
217o "completed" is the number of grace periods that have completed. 242o "completed" is the number of grace periods that have completed.
218 It is comparable to the "c" field from rcu/rcudata in that a 243 It is comparable to the "c" field from rcu/rcudata in that a
@@ -220,44 +245,42 @@ o "completed" is the number of grace periods that have completed.
220 that the corresponding RCU grace period has completed. 245 that the corresponding RCU grace period has completed.
221 246
222o "gpnum" is the number of grace periods that have started. It is 247o "gpnum" is the number of grace periods that have started. It is
223 comparable to the "g" field from rcu/rcudata in that a CPU 248 similarly comparable to the "g" field from rcu/rcudata in that
224 whose "g" field matches the value of "gpnum" is aware that the 249 a CPU whose "g" field matches the value of "gpnum" is aware that
225 corresponding RCU grace period has started. 250 the corresponding RCU grace period has started.
226 251
227 If these two fields are equal (as they are for "rcu_bh" above), 252 If these two fields are equal, then there is no grace period
228 then there is no grace period in progress, in other words, RCU 253 in progress, in other words, RCU is idle. On the other hand,
229 is idle. On the other hand, if the two fields differ (as they 254 if the two fields differ (as they are above), then an RCU grace
230 do for "rcu_sched" above), then an RCU grace period is in progress. 255 period is in progress.
231 256
257o "age" is the number of jiffies that the current grace period
258 has extended for, or zero if there is no grace period currently
259 in effect.
232 260
233The output of "cat rcu/rcuhier" looks as follows, with very long lines: 261o "max" is the age in jiffies of the longest-duration grace period
262 thus far.
234 263
235c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6 264The output of "cat rcu/rcu_preempt/rcuhier" looks as follows:
2361/1 ..>. 0:127 ^0
2373/3 ..>. 0:35 ^0 0/0 ..>. 36:71 ^1 0/0 ..>. 72:107 ^2 0/0 ..>. 108:127 ^3
2383/3f ..>. 0:5 ^0 2/3 ..>. 6:11 ^1 0/0 ..>. 12:17 ^2 0/0 ..>. 18:23 ^3 0/0 ..>. 24:29 ^4 0/0 ..>. 30:35 ^5 0/0 ..>. 36:41 ^0 0/0 ..>. 42:47 ^1 0/0 ..>. 48:53 ^2 0/0 ..>. 54:59 ^3 0/0 ..>. 60:65 ^4 0/0 ..>. 66:71 ^5 0/0 ..>. 72:77 ^0 0/0 ..>. 78:83 ^1 0/0 ..>. 84:89 ^2 0/0 ..>. 90:95 ^3 0/0 ..>. 96:101 ^4 0/0 ..>. 102:107 ^5 0/0 ..>. 108:113 ^0 0/0 ..>. 114:119 ^1 0/0 ..>. 120:125 ^2 0/0 ..>. 126:127 ^3
239rcu_bh:
240c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0
2410/1 ..>. 0:127 ^0
2420/3 ..>. 0:35 ^0 0/0 ..>. 36:71 ^1 0/0 ..>. 72:107 ^2 0/0 ..>. 108:127 ^3
2430/3f ..>. 0:5 ^0 0/3 ..>. 6:11 ^1 0/0 ..>. 12:17 ^2 0/0 ..>. 18:23 ^3 0/0 ..>. 24:29 ^4 0/0 ..>. 30:35 ^5 0/0 ..>. 36:41 ^0 0/0 ..>. 42:47 ^1 0/0 ..>. 48:53 ^2 0/0 ..>. 54:59 ^3 0/0 ..>. 60:65 ^4 0/0 ..>. 66:71 ^5 0/0 ..>. 72:77 ^0 0/0 ..>. 78:83 ^1 0/0 ..>. 84:89 ^2 0/0 ..>. 90:95 ^3 0/0 ..>. 96:101 ^4 0/0 ..>. 102:107 ^5 0/0 ..>. 108:113 ^0 0/0 ..>. 114:119 ^1 0/0 ..>. 120:125 ^2 0/0 ..>. 126:127 ^3
244 265
245This is once again split into "rcu_sched" and "rcu_bh" portions, 266c=14407 g=14408 s=0 jfq=2 j=c863 nfqs=12040/nfqsng=0(12040) fqlh=1051 oqlen=0/0
246and CONFIG_TREE_PREEMPT_RCU kernels will again have an additional 2673/3 ..>. 0:7 ^0
247"rcu_preempt" section. The fields are as follows: 268e/e ..>. 0:3 ^0 d/d ..>. 4:7 ^1
248 269
249o "c" is exactly the same as "completed" under rcu/rcugp. 270The fields are as follows:
250 271
251o "g" is exactly the same as "gpnum" under rcu/rcugp. 272o "c" is exactly the same as "completed" under rcu/rcu_preempt/rcugp.
252 273
253o "s" is the "signaled" state that drives force_quiescent_state()'s 274o "g" is exactly the same as "gpnum" under rcu/rcu_preempt/rcugp.
275
276o "s" is the current state of the force_quiescent_state()
254 state machine. 277 state machine.
255 278
256o "jfq" is the number of jiffies remaining for this grace period 279o "jfq" is the number of jiffies remaining for this grace period
257 before force_quiescent_state() is invoked to help push things 280 before force_quiescent_state() is invoked to help push things
258 along. Note that CPUs in dyntick-idle mode throughout the grace 281 along. Note that CPUs in idle mode throughout the grace period
259 period will not report on their own, but rather must be check by 282 will not report on their own, but rather must be check by some
260 some other CPU via force_quiescent_state(). 283 other CPU via force_quiescent_state().
261 284
262o "j" is the low-order four hex digits of the jiffies counter. 285o "j" is the low-order four hex digits of the jiffies counter.
263 Yes, Paul did run into a number of problems that turned out to 286 Yes, Paul did run into a number of problems that turned out to
@@ -268,7 +291,8 @@ o "nfqs" is the number of calls to force_quiescent_state() since
268 291
269o "nfqsng" is the number of useless calls to force_quiescent_state(), 292o "nfqsng" is the number of useless calls to force_quiescent_state(),
270 where there wasn't actually a grace period active. This can 293 where there wasn't actually a grace period active. This can
271 happen due to races. The number in parentheses is the difference 294 no longer happen due to grace-period processing being pushed
295 into a kthread. The number in parentheses is the difference
272 between "nfqs" and "nfqsng", or the number of times that 296 between "nfqs" and "nfqsng", or the number of times that
273 force_quiescent_state() actually did some real work. 297 force_quiescent_state() actually did some real work.
274 298
@@ -276,28 +300,27 @@ o "fqlh" is the number of calls to force_quiescent_state() that
276 exited immediately (without even being counted in nfqs above) 300 exited immediately (without even being counted in nfqs above)
277 due to contention on ->fqslock. 301 due to contention on ->fqslock.
278 302
279o Each element of the form "1/1 0:127 ^0" represents one struct 303o Each element of the form "3/3 ..>. 0:7 ^0" represents one rcu_node
280 rcu_node. Each line represents one level of the hierarchy, from 304 structure. Each line represents one level of the hierarchy,
281 root to leaves. It is best to think of the rcu_data structures 305 from root to leaves. It is best to think of the rcu_data
282 as forming yet another level after the leaves. Note that there 306 structures as forming yet another level after the leaves.
283 might be either one, two, or three levels of rcu_node structures, 307 Note that there might be either one, two, three, or even four
284 depending on the relationship between CONFIG_RCU_FANOUT and 308 levels of rcu_node structures, depending on the relationship
285 CONFIG_NR_CPUS. 309 between CONFIG_RCU_FANOUT, CONFIG_RCU_FANOUT_LEAF (possibly
310 adjusted using the rcu_fanout_leaf kernel boot parameter), and
311 CONFIG_NR_CPUS (possibly adjusted using the nr_cpu_ids count of
312 possible CPUs for the booting hardware).
286 313
287 o The numbers separated by the "/" are the qsmask followed 314 o The numbers separated by the "/" are the qsmask followed
288 by the qsmaskinit. The qsmask will have one bit 315 by the qsmaskinit. The qsmask will have one bit
289 set for each entity in the next lower level that 316 set for each entity in the next lower level that has
290 has not yet checked in for the current grace period. 317 not yet checked in for the current grace period ("e"
318 indicating CPUs 5, 6, and 7 in the example above).
291 The qsmaskinit will have one bit for each entity that is 319 The qsmaskinit will have one bit for each entity that is
292 currently expected to check in during each grace period. 320 currently expected to check in during each grace period.
293 The value of qsmaskinit is assigned to that of qsmask 321 The value of qsmaskinit is assigned to that of qsmask
294 at the beginning of each grace period. 322 at the beginning of each grace period.
295 323
296 For example, for "rcu_sched", the qsmask of the first
297 entry of the lowest level is 0x14, meaning that we
298 are still waiting for CPUs 2 and 4 to check in for the
299 current grace period.
300
301 o The characters separated by the ">" indicate the state 324 o The characters separated by the ">" indicate the state
302 of the blocked-tasks lists. A "G" preceding the ">" 325 of the blocked-tasks lists. A "G" preceding the ">"
303 indicates that at least one task blocked in an RCU 326 indicates that at least one task blocked in an RCU
@@ -312,48 +335,39 @@ o Each element of the form "1/1 0:127 ^0" represents one struct
312 A "." character appears if the corresponding condition 335 A "." character appears if the corresponding condition
313 does not hold, so that "..>." indicates that no tasks 336 does not hold, so that "..>." indicates that no tasks
314 are blocked. In contrast, "GE>T" indicates maximal 337 are blocked. In contrast, "GE>T" indicates maximal
315 inconvenience from blocked tasks. 338 inconvenience from blocked tasks. CONFIG_TREE_RCU
339 builds of the kernel will always show "..>.".
316 340
317 o The numbers separated by the ":" are the range of CPUs 341 o The numbers separated by the ":" are the range of CPUs
318 served by this struct rcu_node. This can be helpful 342 served by this struct rcu_node. This can be helpful
319 in working out how the hierarchy is wired together. 343 in working out how the hierarchy is wired together.
320 344
321 For example, the first entry at the lowest level shows 345 For example, the example rcu_node structure shown above
322 "0:5", indicating that it covers CPUs 0 through 5. 346 has "0:7", indicating that it covers CPUs 0 through 7.
323 347
324 o The number after the "^" indicates the bit in the 348 o The number after the "^" indicates the bit in the
325 next higher level rcu_node structure that this 349 next higher level rcu_node structure that this rcu_node
326 rcu_node structure corresponds to. 350 structure corresponds to. For example, the "d/d ..>. 4:7
327 351 ^1" has a "1" in this position, indicating that it
328 For example, the first entry at the lowest level shows 352 corresponds to the "1" bit in the "3" shown in the
329 "^0", indicating that it corresponds to bit zero in 353 "3/3 ..>. 0:7 ^0" entry on the next level up.
330 the first entry at the middle level. 354
331 355
332 356The output of "cat rcu/rcu_sched/rcu_pending" looks as follows:
333The output of "cat rcu/rcu_pending" looks as follows: 357
334 358 0!np=26111 qsp=29 rpq=5386 cbr=1 cng=570 gpc=3674 gps=577 nn=15903
335rcu_sched: 359 1!np=28913 qsp=35 rpq=6097 cbr=1 cng=448 gpc=3700 gps=554 nn=18113
336 0 np=255892 qsp=53936 rpq=85 cbr=0 cng=14417 gpc=10033 gps=24320 nn=146741 360 2!np=32740 qsp=37 rpq=6202 cbr=0 cng=476 gpc=4627 gps=546 nn=20889
337 1 np=261224 qsp=54638 rpq=33 cbr=0 cng=25723 gpc=16310 gps=2849 nn=155792 361 3 np=23679 qsp=22 rpq=5044 cbr=1 cng=415 gpc=3403 gps=347 nn=14469
338 2 np=237496 qsp=49664 rpq=23 cbr=0 cng=2762 gpc=45478 gps=1762 nn=136629 362 4!np=30714 qsp=4 rpq=5574 cbr=0 cng=528 gpc=3931 gps=639 nn=20042
339 3 np=236249 qsp=48766 rpq=98 cbr=0 cng=286 gpc=48049 gps=1218 nn=137723 363 5 np=28910 qsp=2 rpq=5246 cbr=0 cng=428 gpc=4105 gps=709 nn=18422
340 4 np=221310 qsp=46850 rpq=7 cbr=0 cng=26 gpc=43161 gps=4634 nn=123110 364 6!np=38648 qsp=5 rpq=7076 cbr=0 cng=840 gpc=4072 gps=961 nn=25699
341 5 np=237332 qsp=48449 rpq=9 cbr=0 cng=54 gpc=47920 gps=3252 nn=137456 365 7 np=37275 qsp=2 rpq=6873 cbr=0 cng=868 gpc=3416 gps=971 nn=25147
342 6 np=219995 qsp=46718 rpq=12 cbr=0 cng=50 gpc=42098 gps=6093 nn=120834 366
343 7 np=249893 qsp=49390 rpq=42 cbr=0 cng=72 gpc=38400 gps=17102 nn=144888 367The fields are as follows:
344rcu_bh: 368
345 0 np=146741 qsp=1419 rpq=6 cbr=0 cng=6 gpc=0 gps=0 nn=145314 369o The leading number is the CPU number, with "!" indicating
346 1 np=155792 qsp=12597 rpq=3 cbr=0 cng=0 gpc=4 gps=8 nn=143180 370 an offline CPU.
347 2 np=136629 qsp=18680 rpq=1 cbr=0 cng=0 gpc=7 gps=6 nn=117936
348 3 np=137723 qsp=2843 rpq=0 cbr=0 cng=0 gpc=10 gps=7 nn=134863
349 4 np=123110 qsp=12433 rpq=0 cbr=0 cng=0 gpc=4 gps=2 nn=110671
350 5 np=137456 qsp=4210 rpq=1 cbr=0 cng=0 gpc=6 gps=5 nn=133235
351 6 np=120834 qsp=9902 rpq=2 cbr=0 cng=0 gpc=6 gps=3 nn=110921
352 7 np=144888 qsp=26336 rpq=0 cbr=0 cng=0 gpc=8 gps=2 nn=118542
353
354As always, this is once again split into "rcu_sched" and "rcu_bh"
355portions, with CONFIG_TREE_PREEMPT_RCU kernels having an additional
356"rcu_preempt" section. The fields are as follows:
357 371
358o "np" is the number of times that __rcu_pending() has been invoked 372o "np" is the number of times that __rcu_pending() has been invoked
359 for the corresponding flavor of RCU. 373 for the corresponding flavor of RCU.
@@ -377,38 +391,23 @@ o "gpc" is the number of times that an old grace period had
377o "gps" is the number of times that a new grace period had started, 391o "gps" is the number of times that a new grace period had started,
378 but this CPU was not yet aware of it. 392 but this CPU was not yet aware of it.
379 393
380o "nn" is the number of times that this CPU needed nothing. Alert 394o "nn" is the number of times that this CPU needed nothing.
381 readers will note that the rcu "nn" number for a given CPU very
382 closely matches the rcu_bh "np" number for that same CPU. This
383 is due to short-circuit evaluation in rcu_pending().
384
385
386The output of "cat rcu/rcutorture" looks as follows:
387
388rcutorture test sequence: 0 (test in progress)
389rcutorture update version number: 615
390
391The first line shows the number of rcutorture tests that have completed
392since boot. If a test is currently running, the "(test in progress)"
393string will appear as shown above. The second line shows the number of
394update cycles that the current test has started, or zero if there is
395no test in progress.
396 395
397 396
398The output of "cat rcu/rcuboost" looks as follows: 397The output of "cat rcu/rcuboost" looks as follows:
399 398
4000:5 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=2f95 bt=300f 3990:3 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=c864 bt=c894
401 balk: nt=0 egt=989 bt=0 nb=0 ny=0 nos=16 400 balk: nt=0 egt=4695 bt=0 nb=0 ny=56 nos=0
4026:7 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=2f95 bt=300f 4014:7 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=c864 bt=c894
403 balk: nt=0 egt=225 bt=0 nb=0 ny=0 nos=6 402 balk: nt=0 egt=6541 bt=0 nb=0 ny=126 nos=0
404 403
405This information is output only for rcu_preempt. Each two-line entry 404This information is output only for rcu_preempt. Each two-line entry
406corresponds to a leaf rcu_node strcuture. The fields are as follows: 405corresponds to a leaf rcu_node strcuture. The fields are as follows:
407 406
408o "n:m" is the CPU-number range for the corresponding two-line 407o "n:m" is the CPU-number range for the corresponding two-line
409 entry. In the sample output above, the first entry covers 408 entry. In the sample output above, the first entry covers
410 CPUs zero through five and the second entry covers CPUs 6 409 CPUs zero through three and the second entry covers CPUs four
411 and 7. 410 through seven.
412 411
413o "tasks=TNEB" gives the state of the various segments of the 412o "tasks=TNEB" gives the state of the various segments of the
414 rnp->blocked_tasks list: 413 rnp->blocked_tasks list: