trace.txt 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. CONFIG_RCU_TRACE debugfs Files and Formats
  2. The rcutree and rcutiny implementations of RCU provide debugfs trace
  3. output that summarizes counters and state. This information is useful for
  4. debugging RCU itself, and can sometimes also help to debug abuses of RCU.
  5. The following sections describe the debugfs files and formats, first
  6. for rcutree and next for rcutiny.
  7. CONFIG_TREE_RCU and CONFIG_TREE_PREEMPT_RCU debugfs Files and Formats
  8. These implementations of RCU provide several debugfs directories under the
  9. top-level directory "rcu":
  10. rcu/rcu_bh
  11. rcu/rcu_preempt
  12. rcu/rcu_sched
  13. Each directory contains files for the corresponding flavor of RCU.
  14. Note that rcu/rcu_preempt is only present for CONFIG_TREE_PREEMPT_RCU.
  15. For CONFIG_TREE_RCU, the RCU flavor maps onto the RCU-sched flavor,
  16. so that activity for both appears in rcu/rcu_sched.
  17. In addition, the following file appears in the top-level directory:
  18. rcu/rcutorture. This file displays rcutorture test progress. The output
  19. of "cat rcu/rcutorture" looks as follows:
  20. rcutorture test sequence: 0 (test in progress)
  21. rcutorture update version number: 615
  22. The first line shows the number of rcutorture tests that have completed
  23. since boot. If a test is currently running, the "(test in progress)"
  24. string will appear as shown above. The second line shows the number of
  25. update cycles that the current test has started, or zero if there is
  26. no test in progress.
  27. Within each flavor directory (rcu/rcu_bh, rcu/rcu_sched, and possibly
  28. also rcu/rcu_preempt) the following files will be present:
  29. rcudata:
  30. Displays fields in struct rcu_data.
  31. rcuexp:
  32. Displays statistics for expedited grace periods.
  33. rcugp:
  34. Displays grace-period counters.
  35. rcuhier:
  36. Displays the struct rcu_node hierarchy.
  37. rcu_pending:
  38. Displays counts of the reasons rcu_pending() decided that RCU had
  39. work to do.
  40. rcuboost:
  41. Displays RCU boosting statistics. Only present if
  42. CONFIG_RCU_BOOST=y.
  43. The output of "cat rcu/rcu_preempt/rcudata" looks as follows:
  44. 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
  45. 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
  46. 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
  47. 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
  48. 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
  49. 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
  50. 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
  51. 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
  52. This file has one line per CPU, or eight for this 8-CPU system.
  53. The fields are as follows:
  54. o The number at the beginning of each line is the CPU number.
  55. CPUs numbers followed by an exclamation mark are offline,
  56. but have been online at least once since boot. There will be
  57. no output for CPUs that have never been online, which can be
  58. a good thing in the surprisingly common case where NR_CPUS is
  59. substantially larger than the number of actual CPUs.
  60. o "c" is the count of grace periods that this CPU believes have
  61. completed. Offlined CPUs and CPUs in dynticks idle mode may lag
  62. quite a ways behind, for example, CPU 4 under "rcu_sched" above,
  63. which has been offline through 16 RCU grace periods. It is not
  64. unusual to see offline CPUs lagging by thousands of grace periods.
  65. Note that although the grace-period number is an unsigned long,
  66. it is printed out as a signed long to allow more human-friendly
  67. representation near boot time.
  68. o "g" is the count of grace periods that this CPU believes have
  69. started. Again, offlined CPUs and CPUs in dynticks idle mode
  70. may lag behind. If the "c" and "g" values are equal, this CPU
  71. has already reported a quiescent state for the last RCU grace
  72. period that it is aware of, otherwise, the CPU believes that it
  73. owes RCU a quiescent state.
  74. o "pq" indicates that this CPU has passed through a quiescent state
  75. for the current grace period. It is possible for "pq" to be
  76. "1" and "c" different than "g", which indicates that although
  77. the CPU has passed through a quiescent state, either (1) this
  78. CPU has not yet reported that fact, (2) some other CPU has not
  79. yet reported for this grace period, or (3) both.
  80. o "qp" indicates that RCU still expects a quiescent state from
  81. this CPU. Offlined CPUs and CPUs in dyntick idle mode might
  82. well have qp=1, which is OK: RCU is still ignoring them.
  83. o "dt" is the current value of the dyntick counter that is incremented
  84. when entering or leaving idle, either due to a context switch or
  85. due to an interrupt. This number is even if the CPU is in idle
  86. from RCU's viewpoint and odd otherwise. The number after the
  87. first "/" is the interrupt nesting depth when in idle state,
  88. or a large number added to the interrupt-nesting depth when
  89. running a non-idle task. Some architectures do not accurately
  90. count interrupt nesting when running in non-idle kernel context,
  91. which can result in interesting anomalies such as negative
  92. interrupt-nesting levels. The number after the second "/"
  93. is the NMI nesting depth.
  94. o "df" is the number of times that some other CPU has forced a
  95. quiescent state on behalf of this CPU due to this CPU being in
  96. idle state.
  97. o "of" is the number of times that some other CPU has forced a
  98. quiescent state on behalf of this CPU due to this CPU being
  99. offline. In a perfect world, this might never happen, but it
  100. turns out that offlining and onlining a CPU can take several grace
  101. periods, and so there is likely to be an extended period of time
  102. when RCU believes that the CPU is online when it really is not.
  103. Please note that erring in the other direction (RCU believing a
  104. CPU is offline when it is really alive and kicking) is a fatal
  105. error, so it makes sense to err conservatively.
  106. o "ql" is the number of RCU callbacks currently residing on
  107. this CPU. The first number is the number of "lazy" callbacks
  108. that are known to RCU to only be freeing memory, and the number
  109. after the "/" is the total number of callbacks, lazy or not.
  110. These counters count callbacks regardless of what phase of
  111. grace-period processing that they are in (new, waiting for
  112. grace period to start, waiting for grace period to end, ready
  113. to invoke).
  114. o "qs" gives an indication of the state of the callback queue
  115. with four characters:
  116. "N" Indicates that there are callbacks queued that are not
  117. ready to be handled by the next grace period, and thus
  118. will be handled by the grace period following the next
  119. one.
  120. "R" Indicates that there are callbacks queued that are
  121. ready to be handled by the next grace period.
  122. "W" Indicates that there are callbacks queued that are
  123. waiting on the current grace period.
  124. "D" Indicates that there are callbacks queued that have
  125. already been handled by a prior grace period, and are
  126. thus waiting to be invoked. Note that callbacks in
  127. the process of being invoked are not counted here.
  128. Callbacks in the process of being invoked are those
  129. that have been removed from the rcu_data structures
  130. queues by rcu_do_batch(), but which have not yet been
  131. invoked.
  132. If there are no callbacks in a given one of the above states,
  133. the corresponding character is replaced by ".".
  134. o "b" is the batch limit for this CPU. If more than this number
  135. of RCU callbacks is ready to invoke, then the remainder will
  136. be deferred.
  137. o "ci" is the number of RCU callbacks that have been invoked for
  138. this CPU. Note that ci+nci+ql is the number of callbacks that have
  139. been registered in absence of CPU-hotplug activity.
  140. o "nci" is the number of RCU callbacks that have been offloaded from
  141. this CPU. This will always be zero unless the kernel was built
  142. with CONFIG_RCU_NOCB_CPU=y and the "rcu_nocbs=" kernel boot
  143. parameter was specified.
  144. o "co" is the number of RCU callbacks that have been orphaned due to
  145. this CPU going offline. These orphaned callbacks have been moved
  146. to an arbitrarily chosen online CPU.
  147. o "ca" is the number of RCU callbacks that have been adopted by this
  148. CPU due to other CPUs going offline. Note that ci+co-ca+ql is
  149. the number of RCU callbacks registered on this CPU.
  150. Kernels compiled with CONFIG_RCU_BOOST=y display the following from
  151. /debug/rcu/rcu_preempt/rcudata:
  152. 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
  153. 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
  154. 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
  155. 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
  156. 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
  157. 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
  158. 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
  159. 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
  160. This is similar to the output discussed above, but contains the following
  161. additional fields:
  162. o "kt" is the per-CPU kernel-thread state. The digit preceding
  163. the first slash is zero if there is no work pending and 1
  164. otherwise. The character between the first pair of slashes is
  165. as follows:
  166. "S" The kernel thread is stopped, in other words, all
  167. CPUs corresponding to this rcu_node structure are
  168. offline.
  169. "R" The kernel thread is running.
  170. "W" The kernel thread is waiting because there is no work
  171. for it to do.
  172. "O" The kernel thread is waiting because it has been
  173. forced off of its designated CPU or because its
  174. ->cpus_allowed mask permits it to run on other than
  175. its designated CPU.
  176. "Y" The kernel thread is yielding to avoid hogging CPU.
  177. "?" Unknown value, indicates a bug.
  178. The number after the final slash is the CPU that the kthread
  179. is actually running on.
  180. This field is displayed only for CONFIG_RCU_BOOST kernels.
  181. o "ktl" is the low-order 16 bits (in hexadecimal) of the count of
  182. the number of times that this CPU's per-CPU kthread has gone
  183. through its loop servicing invoke_rcu_cpu_kthread() requests.
  184. This field is displayed only for CONFIG_RCU_BOOST kernels.
  185. The output of "cat rcu/rcu_preempt/rcuexp" looks as follows:
  186. s=21872 d=21872 w=0 tf=0 wd1=0 wd2=0 n=0 sc=21872 dt=21872 dl=0 dx=21872
  187. These fields are as follows:
  188. o "s" is the starting sequence number.
  189. o "d" is the ending sequence number. When the starting and ending
  190. numbers differ, there is an expedited grace period in progress.
  191. o "w" is the number of times that the sequence numbers have been
  192. in danger of wrapping.
  193. o "tf" is the number of times that contention has resulted in a
  194. failure to begin an expedited grace period.
  195. o "wd1" and "wd2" are the number of times that an attempt to
  196. start an expedited grace period found that someone else had
  197. completed an expedited grace period that satisfies the
  198. attempted request. "Our work is done."
  199. o "n" is number of times that contention was so great that
  200. the request was demoted from an expedited grace period to
  201. a normal grace period.
  202. o "sc" is the number of times that the attempt to start a
  203. new expedited grace period succeeded.
  204. o "dt" is the number of times that we attempted to update
  205. the "d" counter.
  206. o "dl" is the number of times that we failed to update the "d"
  207. counter.
  208. o "dx" is the number of times that we succeeded in updating
  209. the "d" counter.
  210. The output of "cat rcu/rcu_preempt/rcugp" looks as follows:
  211. completed=31249 gpnum=31250 age=1 max=18
  212. These fields are taken from the rcu_state structure, and are as follows:
  213. o "completed" is the number of grace periods that have completed.
  214. It is comparable to the "c" field from rcu/rcudata in that a
  215. CPU whose "c" field matches the value of "completed" is aware
  216. that the corresponding RCU grace period has completed.
  217. o "gpnum" is the number of grace periods that have started. It is
  218. similarly comparable to the "g" field from rcu/rcudata in that
  219. a CPU whose "g" field matches the value of "gpnum" is aware that
  220. the corresponding RCU grace period has started.
  221. If these two fields are equal, then there is no grace period
  222. in progress, in other words, RCU is idle. On the other hand,
  223. if the two fields differ (as they are above), then an RCU grace
  224. period is in progress.
  225. o "age" is the number of jiffies that the current grace period
  226. has extended for, or zero if there is no grace period currently
  227. in effect.
  228. o "max" is the age in jiffies of the longest-duration grace period
  229. thus far.
  230. The output of "cat rcu/rcu_preempt/rcuhier" looks as follows:
  231. c=14407 g=14408 s=0 jfq=2 j=c863 nfqs=12040/nfqsng=0(12040) fqlh=1051 oqlen=0/0
  232. 3/3 ..>. 0:7 ^0
  233. e/e ..>. 0:3 ^0 d/d ..>. 4:7 ^1
  234. The fields are as follows:
  235. o "c" is exactly the same as "completed" under rcu/rcu_preempt/rcugp.
  236. o "g" is exactly the same as "gpnum" under rcu/rcu_preempt/rcugp.
  237. o "s" is the current state of the force_quiescent_state()
  238. state machine.
  239. o "jfq" is the number of jiffies remaining for this grace period
  240. before force_quiescent_state() is invoked to help push things
  241. along. Note that CPUs in idle mode throughout the grace period
  242. will not report on their own, but rather must be check by some
  243. other CPU via force_quiescent_state().
  244. o "j" is the low-order four hex digits of the jiffies counter.
  245. Yes, Paul did run into a number of problems that turned out to
  246. be due to the jiffies counter no longer counting. Why do you ask?
  247. o "nfqs" is the number of calls to force_quiescent_state() since
  248. boot.
  249. o "nfqsng" is the number of useless calls to force_quiescent_state(),
  250. where there wasn't actually a grace period active. This can
  251. no longer happen due to grace-period processing being pushed
  252. into a kthread. The number in parentheses is the difference
  253. between "nfqs" and "nfqsng", or the number of times that
  254. force_quiescent_state() actually did some real work.
  255. o "fqlh" is the number of calls to force_quiescent_state() that
  256. exited immediately (without even being counted in nfqs above)
  257. due to contention on ->fqslock.
  258. o Each element of the form "3/3 ..>. 0:7 ^0" represents one rcu_node
  259. structure. Each line represents one level of the hierarchy,
  260. from root to leaves. It is best to think of the rcu_data
  261. structures as forming yet another level after the leaves.
  262. Note that there might be either one, two, three, or even four
  263. levels of rcu_node structures, depending on the relationship
  264. between CONFIG_RCU_FANOUT, CONFIG_RCU_FANOUT_LEAF (possibly
  265. adjusted using the rcu_fanout_leaf kernel boot parameter), and
  266. CONFIG_NR_CPUS (possibly adjusted using the nr_cpu_ids count of
  267. possible CPUs for the booting hardware).
  268. o The numbers separated by the "/" are the qsmask followed
  269. by the qsmaskinit. The qsmask will have one bit
  270. set for each entity in the next lower level that has
  271. not yet checked in for the current grace period ("e"
  272. indicating CPUs 5, 6, and 7 in the example above).
  273. The qsmaskinit will have one bit for each entity that is
  274. currently expected to check in during each grace period.
  275. The value of qsmaskinit is assigned to that of qsmask
  276. at the beginning of each grace period.
  277. o The characters separated by the ">" indicate the state
  278. of the blocked-tasks lists. A "G" preceding the ">"
  279. indicates that at least one task blocked in an RCU
  280. read-side critical section blocks the current grace
  281. period, while a "E" preceding the ">" indicates that
  282. at least one task blocked in an RCU read-side critical
  283. section blocks the current expedited grace period.
  284. A "T" character following the ">" indicates that at
  285. least one task is blocked within an RCU read-side
  286. critical section, regardless of whether any current
  287. grace period (expedited or normal) is inconvenienced.
  288. A "." character appears if the corresponding condition
  289. does not hold, so that "..>." indicates that no tasks
  290. are blocked. In contrast, "GE>T" indicates maximal
  291. inconvenience from blocked tasks. CONFIG_TREE_RCU
  292. builds of the kernel will always show "..>.".
  293. o The numbers separated by the ":" are the range of CPUs
  294. served by this struct rcu_node. This can be helpful
  295. in working out how the hierarchy is wired together.
  296. For example, the example rcu_node structure shown above
  297. has "0:7", indicating that it covers CPUs 0 through 7.
  298. o The number after the "^" indicates the bit in the
  299. next higher level rcu_node structure that this rcu_node
  300. structure corresponds to. For example, the "d/d ..>. 4:7
  301. ^1" has a "1" in this position, indicating that it
  302. corresponds to the "1" bit in the "3" shown in the
  303. "3/3 ..>. 0:7 ^0" entry on the next level up.
  304. The output of "cat rcu/rcu_sched/rcu_pending" looks as follows:
  305. 0!np=26111 qsp=29 rpq=5386 cbr=1 cng=570 gpc=3674 gps=577 nn=15903
  306. 1!np=28913 qsp=35 rpq=6097 cbr=1 cng=448 gpc=3700 gps=554 nn=18113
  307. 2!np=32740 qsp=37 rpq=6202 cbr=0 cng=476 gpc=4627 gps=546 nn=20889
  308. 3 np=23679 qsp=22 rpq=5044 cbr=1 cng=415 gpc=3403 gps=347 nn=14469
  309. 4!np=30714 qsp=4 rpq=5574 cbr=0 cng=528 gpc=3931 gps=639 nn=20042
  310. 5 np=28910 qsp=2 rpq=5246 cbr=0 cng=428 gpc=4105 gps=709 nn=18422
  311. 6!np=38648 qsp=5 rpq=7076 cbr=0 cng=840 gpc=4072 gps=961 nn=25699
  312. 7 np=37275 qsp=2 rpq=6873 cbr=0 cng=868 gpc=3416 gps=971 nn=25147
  313. The fields are as follows:
  314. o The leading number is the CPU number, with "!" indicating
  315. an offline CPU.
  316. o "np" is the number of times that __rcu_pending() has been invoked
  317. for the corresponding flavor of RCU.
  318. o "qsp" is the number of times that the RCU was waiting for a
  319. quiescent state from this CPU.
  320. o "rpq" is the number of times that the CPU had passed through
  321. a quiescent state, but not yet reported it to RCU.
  322. o "cbr" is the number of times that this CPU had RCU callbacks
  323. that had passed through a grace period, and were thus ready
  324. to be invoked.
  325. o "cng" is the number of times that this CPU needed another
  326. grace period while RCU was idle.
  327. o "gpc" is the number of times that an old grace period had
  328. completed, but this CPU was not yet aware of it.
  329. o "gps" is the number of times that a new grace period had started,
  330. but this CPU was not yet aware of it.
  331. o "nn" is the number of times that this CPU needed nothing.
  332. The output of "cat rcu/rcuboost" looks as follows:
  333. 0:3 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=c864 bt=c894
  334. balk: nt=0 egt=4695 bt=0 nb=0 ny=56 nos=0
  335. 4:7 tasks=.... kt=W ntb=0 neb=0 nnb=0 j=c864 bt=c894
  336. balk: nt=0 egt=6541 bt=0 nb=0 ny=126 nos=0
  337. This information is output only for rcu_preempt. Each two-line entry
  338. corresponds to a leaf rcu_node strcuture. The fields are as follows:
  339. o "n:m" is the CPU-number range for the corresponding two-line
  340. entry. In the sample output above, the first entry covers
  341. CPUs zero through three and the second entry covers CPUs four
  342. through seven.
  343. o "tasks=TNEB" gives the state of the various segments of the
  344. rnp->blocked_tasks list:
  345. "T" This indicates that there are some tasks that blocked
  346. while running on one of the corresponding CPUs while
  347. in an RCU read-side critical section.
  348. "N" This indicates that some of the blocked tasks are preventing
  349. the current normal (non-expedited) grace period from
  350. completing.
  351. "E" This indicates that some of the blocked tasks are preventing
  352. the current expedited grace period from completing.
  353. "B" This indicates that some of the blocked tasks are in
  354. need of RCU priority boosting.
  355. Each character is replaced with "." if the corresponding
  356. condition does not hold.
  357. o "kt" is the state of the RCU priority-boosting kernel
  358. thread associated with the corresponding rcu_node structure.
  359. The state can be one of the following:
  360. "S" The kernel thread is stopped, in other words, all
  361. CPUs corresponding to this rcu_node structure are
  362. offline.
  363. "R" The kernel thread is running.
  364. "W" The kernel thread is waiting because there is no work
  365. for it to do.
  366. "Y" The kernel thread is yielding to avoid hogging CPU.
  367. "?" Unknown value, indicates a bug.
  368. o "ntb" is the number of tasks boosted.
  369. o "neb" is the number of tasks boosted in order to complete an
  370. expedited grace period.
  371. o "nnb" is the number of tasks boosted in order to complete a
  372. normal (non-expedited) grace period. When boosting a task
  373. that was blocking both an expedited and a normal grace period,
  374. it is counted against the expedited total above.
  375. o "j" is the low-order 16 bits of the jiffies counter in
  376. hexadecimal.
  377. o "bt" is the low-order 16 bits of the value that the jiffies
  378. counter will have when we next start boosting, assuming that
  379. the current grace period does not end beforehand. This is
  380. also in hexadecimal.
  381. o "balk: nt" counts the number of times we didn't boost (in
  382. other words, we balked) even though it was time to boost because
  383. there were no blocked tasks to boost. This situation occurs
  384. when there is one blocked task on one rcu_node structure and
  385. none on some other rcu_node structure.
  386. o "egt" counts the number of times we balked because although
  387. there were blocked tasks, none of them were blocking the
  388. current grace period, whether expedited or otherwise.
  389. o "bt" counts the number of times we balked because boosting
  390. had already been initiated for the current grace period.
  391. o "nb" counts the number of times we balked because there
  392. was at least one task blocking the current non-expedited grace
  393. period that never had blocked. If it is already running, it
  394. just won't help to boost its priority!
  395. o "ny" counts the number of times we balked because it was
  396. not yet time to start boosting.
  397. o "nos" counts the number of times we balked for other
  398. reasons, e.g., the grace period ended first.
  399. CONFIG_TINY_RCU and CONFIG_TINY_PREEMPT_RCU debugfs Files and Formats
  400. These implementations of RCU provides a single debugfs file under the
  401. top-level directory RCU, namely rcu/rcudata, which displays fields in
  402. rcu_bh_ctrlblk, rcu_sched_ctrlblk and, for CONFIG_TINY_PREEMPT_RCU,
  403. rcu_preempt_ctrlblk.
  404. The output of "cat rcu/rcudata" is as follows:
  405. rcu_preempt: qlen=24 gp=1097669 g197/p197/c197 tasks=...
  406. ttb=. btg=no ntb=184 neb=0 nnb=183 j=01f7 bt=0274
  407. normal balk: nt=1097669 gt=0 bt=371 b=0 ny=25073378 nos=0
  408. exp balk: bt=0 nos=0
  409. rcu_sched: qlen: 0
  410. rcu_bh: qlen: 0
  411. This is split into rcu_preempt, rcu_sched, and rcu_bh sections, with the
  412. rcu_preempt section appearing only in CONFIG_TINY_PREEMPT_RCU builds.
  413. The last three lines of the rcu_preempt section appear only in
  414. CONFIG_RCU_BOOST kernel builds. The fields are as follows:
  415. o "qlen" is the number of RCU callbacks currently waiting either
  416. for an RCU grace period or waiting to be invoked. This is the
  417. only field present for rcu_sched and rcu_bh, due to the
  418. short-circuiting of grace period in those two cases.
  419. o "gp" is the number of grace periods that have completed.
  420. o "g197/p197/c197" displays the grace-period state, with the
  421. "g" number being the number of grace periods that have started
  422. (mod 256), the "p" number being the number of grace periods
  423. that the CPU has responded to (also mod 256), and the "c"
  424. number being the number of grace periods that have completed
  425. (once again mode 256).
  426. Why have both "gp" and "g"? Because the data flowing into
  427. "gp" is only present in a CONFIG_RCU_TRACE kernel.
  428. o "tasks" is a set of bits. The first bit is "T" if there are
  429. currently tasks that have recently blocked within an RCU
  430. read-side critical section, the second bit is "N" if any of the
  431. aforementioned tasks are blocking the current RCU grace period,
  432. and the third bit is "E" if any of the aforementioned tasks are
  433. blocking the current expedited grace period. Each bit is "."
  434. if the corresponding condition does not hold.
  435. o "ttb" is a single bit. It is "B" if any of the blocked tasks
  436. need to be priority boosted and "." otherwise.
  437. o "btg" indicates whether boosting has been carried out during
  438. the current grace period, with "exp" indicating that boosting
  439. is in progress for an expedited grace period, "no" indicating
  440. that boosting has not yet started for a normal grace period,
  441. "begun" indicating that boosting has bebug for a normal grace
  442. period, and "done" indicating that boosting has completed for
  443. a normal grace period.
  444. o "ntb" is the total number of tasks subjected to RCU priority boosting
  445. periods since boot.
  446. o "neb" is the number of expedited grace periods that have had
  447. to resort to RCU priority boosting since boot.
  448. o "nnb" is the number of normal grace periods that have had
  449. to resort to RCU priority boosting since boot.
  450. o "j" is the low-order 16 bits of the jiffies counter in hexadecimal.
  451. o "bt" is the low-order 16 bits of the value that the jiffies counter
  452. will have at the next time that boosting is scheduled to begin.
  453. o In the line beginning with "normal balk", the fields are as follows:
  454. o "nt" is the number of times that the system balked from
  455. boosting because there were no blocked tasks to boost.
  456. Note that the system will balk from boosting even if the
  457. grace period is overdue when the currently running task
  458. is looping within an RCU read-side critical section.
  459. There is no point in boosting in this case, because
  460. boosting a running task won't make it run any faster.
  461. o "gt" is the number of times that the system balked
  462. from boosting because, although there were blocked tasks,
  463. none of them were preventing the current grace period
  464. from completing.
  465. o "bt" is the number of times that the system balked
  466. from boosting because boosting was already in progress.
  467. o "b" is the number of times that the system balked from
  468. boosting because boosting had already completed for
  469. the grace period in question.
  470. o "ny" is the number of times that the system balked from
  471. boosting because it was not yet time to start boosting
  472. the grace period in question.
  473. o "nos" is the number of times that the system balked from
  474. boosting for inexplicable ("not otherwise specified")
  475. reasons. This can actually happen due to races involving
  476. increments of the jiffies counter.
  477. o In the line beginning with "exp balk", the fields are as follows:
  478. o "bt" is the number of times that the system balked from
  479. boosting because there were no blocked tasks to boost.
  480. o "nos" is the number of times that the system balked from
  481. boosting for inexplicable ("not otherwise specified")
  482. reasons.