Commit Graph

2 Commits

Author SHA1 Message Date
Dave Anderson
df08978f31 Improvement of the "dev -d" option to display I/O statics for disks
whose device driver uses the blk-mq interface.  Currently "dev -d"
always displays 0 in all fields for the blk-mq disk because blk-mq
does not increment/decrement request_list.count[2] on I/O creation
and I/O completion.  The following values are used in blk-mq in such
situations:
  - I/O creation:   blk_mq_ctx.rq_dispatched[2]
  - I/O completion: blk_mq_ctx.rq_completed[2]
So, we can get the counter of in-progress I/Os as follows:
  in progress I/Os == rq_dispatched - rq_completed
This patch displays the result of above calculation for the disk.
It determines whether the device driver uses blk-mq if the
request_queue.mq_ops is not NULL.  The "DRV" field is displayed as
"N/A(MQ)" if the value for in-flight in the device driver does not
exist for blk-mq.
(m.mizuma@jp.fujitsu.com)
2016-10-12 11:28:40 -04:00
Dave Anderson
03e3937ec7 Initial commit: crash-7.0.4 2014-01-28 16:46:11 -05:00