Commit Graph

7 Commits

Author SHA1 Message Date
Dave Anderson
71a4f36767 Linux 4.18 kernels introduced a new CONFIG_PROC_VMCORE_DEVICE_DUMP
configuration in commit 2724273e8fd00b512596a77ee063f49b25f36507,
titled "vmcore: add API to collect hardware dump in second kernel",
in which device drivers may collect a device specific snapshot of the
hardware/firmware state of their underlying devices, and export the
data as a kdump ELF note with type NT_VMCOREDD.  This patch
recognizes the new ELF note(s) in both ELF and compressed kdump
vmcore dumpfiles.  The "help -[nD]" option shows basic information
about each note, and two new "dev" command options have been
introduced.  The "dev -V" option displays an indexed list of each
note, showing the device name, the dumpfile offset, and the size
of each note.  The "dev -v index [file]" option either dumps the
contents of a note to the display screen in a human-readable format,
or copies the note data directly to a specified file.
(surendra@chelsio.com)
2019-04-23 14:36:56 -04:00
Dave Anderson
dc70e6a5e0 Fix for the "dev -[dD]" options on Linux 5.1-rc1 and later kernels
that contain commit 570d0200123fb4f809aa2f6226e93a458d664d70, titled
"driver core: move device->knode_class to device_private".  Without
the patch, the command options fail with the error message "dev:
invalid structure member offset: device_knode_class".
(k-hagio@ab.jp.nec.com)
2019-04-15 15:48:49 -04:00
Dave Anderson
361f050e31 Fix for the "dev -[dD]" options in kernels containing Linux 5.0-rc1
commit 7ff4f8035695984c513598e2d49c8277d5d234ca, titled "block:
remove dead queue members", in which the number of I/Os issued to
a disk driver are no longer stored in the request_queue structure.
Without the patch, the options indicate "dev: -d option not supported
or applicable on this architecture or kernel".  With the patch, the
"DRV" column is not shown.
(m.mizuma@jp.fujitsu.com)
2019-01-07 13:56:15 -05:00
Dave Anderson
27a6ebd0cd Resurrection of the the "dev -p" option for displaying PCI device
data on Linux 2.6.26 and later kernels.  The option was deprecated
as of Linux 2.6.26, and without the patch, the option would indicate
"dev: -p option not supported or applicable on this architecture
or kernel" when running against the newer kernel versions.  PCI Bus
information will also be displayed with this patch.
(m.mizuma@jp.fujitsu.com)
2018-09-24 16:33:57 -04:00
Dave Anderson
613e5c7d69 Implemented a new "dev -D" option that is the same as "dev -d", but
filters out the display of disks that have no I/O in progress.
(oleksandr@redhat.com)
2017-11-06 15:12:59 -05:00
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