aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/slow-work.txt
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-11-19 13:10:51 -0500
committerDavid Howells <dhowells@redhat.com>2009-11-19 13:10:51 -0500
commit8fba10a42d191de612e60e7009c8f0313f90a9b3 (patch)
tree1e772fcc7ad3eb5bb3ca1c6cd156171295e6db25 /Documentation/slow-work.txt
parent6b8268b17a1ffc942bc72d7d00274e433d6b6719 (diff)
SLOW_WORK: Allow the work items to be viewed through a /proc file
Allow the executing and queued work items to be viewed through a /proc file for debugging purposes. The contents look something like the following: THR PID ITEM ADDR FL MARK DESC === ===== ================ == ===== ========== 0 3005 ffff880023f52348 a 952ms FSC: OBJ17d3: LOOK 1 3006 ffff880024e33668 2 160ms FSC: OBJ17e5 OP60d3b: Write1/Store fl=2 2 3165 ffff8800296dd180 a 424ms FSC: OBJ17e4: LOOK 3 4089 ffff8800262c8d78 a 212ms FSC: OBJ17ea: CRTN 4 4090 ffff88002792bed8 2 388ms FSC: OBJ17e8 OP60d36: Write1/Store fl=2 5 4092 ffff88002a0ef308 2 388ms FSC: OBJ17e7 OP60d2e: Write1/Store fl=2 6 4094 ffff88002abaf4b8 2 132ms FSC: OBJ17e2 OP60d4e: Write1/Store fl=2 7 4095 ffff88002bb188e0 a 388ms FSC: OBJ17e9: CRTN vsq - ffff880023d99668 1 308ms FSC: OBJ17e0 OP60f91: Write1/EnQ fl=2 vsq - ffff8800295d1740 1 212ms FSC: OBJ16be OP4d4b6: Write1/EnQ fl=2 vsq - ffff880025ba3308 1 160ms FSC: OBJ179a OP58dec: Write1/EnQ fl=2 vsq - ffff880024ec83e0 1 160ms FSC: OBJ17ae OP599f2: Write1/EnQ fl=2 vsq - ffff880026618e00 1 160ms FSC: OBJ17e6 OP60d33: Write1/EnQ fl=2 vsq - ffff880025a2a4b8 1 132ms FSC: OBJ16a2 OP4d583: Write1/EnQ fl=2 vsq - ffff880023cbe6d8 9 212ms FSC: OBJ17eb: LOOK vsq - ffff880024d37590 9 212ms FSC: OBJ17ec: LOOK vsq - ffff880027746cb0 9 212ms FSC: OBJ17ed: LOOK vsq - ffff880024d37ae8 9 212ms FSC: OBJ17ee: LOOK vsq - ffff880024d37cb0 9 212ms FSC: OBJ17ef: LOOK vsq - ffff880025036550 9 212ms FSC: OBJ17f0: LOOK vsq - ffff8800250368e0 9 212ms FSC: OBJ17f1: LOOK vsq - ffff880025036aa8 9 212ms FSC: OBJ17f2: LOOK In the 'THR' column, executing items show the thread they're occupying and queued threads indicate which queue they're on. 'PID' shows the process ID of a slow-work thread that's executing something. 'FL' shows the work item flags. 'MARK' indicates how long since an item was queued or began executing. Lastly, the 'DESC' column permits the owner of an item to give some information. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'Documentation/slow-work.txt')
-rw-r--r--Documentation/slow-work.txt60
1 files changed, 59 insertions, 1 deletions
diff --git a/Documentation/slow-work.txt b/Documentation/slow-work.txt
index a9d1b0ffdded..f120238e70fe 100644
--- a/Documentation/slow-work.txt
+++ b/Documentation/slow-work.txt
@@ -149,7 +149,8 @@ ITEM OPERATIONS
149=============== 149===============
150 150
151Each work item requires a table of operations of type struct slow_work_ops. 151Each work item requires a table of operations of type struct slow_work_ops.
152Only ->execute() is required, getting and putting of a reference are optional. 152Only ->execute() is required; the getting and putting of a reference and the
153describing of an item are all optional.
153 154
154 (*) Get a reference on an item: 155 (*) Get a reference on an item:
155 156
@@ -179,6 +180,16 @@ Only ->execute() is required, getting and putting of a reference are optional.
179 This should perform the work required of the item. It may sleep, it may 180 This should perform the work required of the item. It may sleep, it may
180 perform disk I/O and it may wait for locks. 181 perform disk I/O and it may wait for locks.
181 182
183 (*) View an item through /proc:
184
185 void (*desc)(struct slow_work *work, struct seq_file *m);
186
187 If supplied, this should print to 'm' a small string describing the work
188 the item is to do. This should be no more than about 40 characters, and
189 shouldn't include a newline character.
190
191 See the 'Viewing executing and queued items' section below.
192
182 193
183================== 194==================
184POOL CONFIGURATION 195POOL CONFIGURATION
@@ -203,3 +214,50 @@ The slow-work thread pool has a number of configurables:
203 is bounded to between 1 and one fewer than the number of active threads. 214 is bounded to between 1 and one fewer than the number of active threads.
204 This ensures there is always at least one thread that can process very 215 This ensures there is always at least one thread that can process very
205 slow work items, and always at least one thread that won't. 216 slow work items, and always at least one thread that won't.
217
218
219==================================
220VIEWING EXECUTING AND QUEUED ITEMS
221==================================
222
223If CONFIG_SLOW_WORK_PROC is enabled, a proc file is made available:
224
225 /proc/slow_work_rq
226
227through which the list of work items being executed and the queues of items to
228be executed may be viewed. The owner of a work item is given the chance to
229add some information of its own.
230
231The contents look something like the following:
232
233 THR PID ITEM ADDR FL MARK DESC
234 === ===== ================ == ===== ==========
235 0 3005 ffff880023f52348 a 952ms FSC: OBJ17d3: LOOK
236 1 3006 ffff880024e33668 2 160ms FSC: OBJ17e5 OP60d3b: Write1/Store fl=2
237 2 3165 ffff8800296dd180 a 424ms FSC: OBJ17e4: LOOK
238 3 4089 ffff8800262c8d78 a 212ms FSC: OBJ17ea: CRTN
239 4 4090 ffff88002792bed8 2 388ms FSC: OBJ17e8 OP60d36: Write1/Store fl=2
240 5 4092 ffff88002a0ef308 2 388ms FSC: OBJ17e7 OP60d2e: Write1/Store fl=2
241 6 4094 ffff88002abaf4b8 2 132ms FSC: OBJ17e2 OP60d4e: Write1/Store fl=2
242 7 4095 ffff88002bb188e0 a 388ms FSC: OBJ17e9: CRTN
243 vsq - ffff880023d99668 1 308ms FSC: OBJ17e0 OP60f91: Write1/EnQ fl=2
244 vsq - ffff8800295d1740 1 212ms FSC: OBJ16be OP4d4b6: Write1/EnQ fl=2
245 vsq - ffff880025ba3308 1 160ms FSC: OBJ179a OP58dec: Write1/EnQ fl=2
246 vsq - ffff880024ec83e0 1 160ms FSC: OBJ17ae OP599f2: Write1/EnQ fl=2
247 vsq - ffff880026618e00 1 160ms FSC: OBJ17e6 OP60d33: Write1/EnQ fl=2
248 vsq - ffff880025a2a4b8 1 132ms FSC: OBJ16a2 OP4d583: Write1/EnQ fl=2
249 vsq - ffff880023cbe6d8 9 212ms FSC: OBJ17eb: LOOK
250 vsq - ffff880024d37590 9 212ms FSC: OBJ17ec: LOOK
251 vsq - ffff880027746cb0 9 212ms FSC: OBJ17ed: LOOK
252 vsq - ffff880024d37ae8 9 212ms FSC: OBJ17ee: LOOK
253 vsq - ffff880024d37cb0 9 212ms FSC: OBJ17ef: LOOK
254 vsq - ffff880025036550 9 212ms FSC: OBJ17f0: LOOK
255 vsq - ffff8800250368e0 9 212ms FSC: OBJ17f1: LOOK
256 vsq - ffff880025036aa8 9 212ms FSC: OBJ17f2: LOOK
257
258In the 'THR' column, executing items show the thread they're occupying and
259queued threads indicate which queue they're on. 'PID' shows the process ID of
260a slow-work thread that's executing something. 'FL' shows the work item flags.
261'MARK' indicates how long since an item was queued or began executing. Lastly,
262the 'DESC' column permits the owner of an item to give some information.
263