linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/7] nvme-pci: support device coredump
@ 2019-05-12 15:54 Akinobu Mita
  2019-05-12 15:54 ` [PATCH v3 1/7] devcoredump: use memory_read_from_buffer Akinobu Mita
                   ` (8 more replies)
  0 siblings, 9 replies; 22+ messages in thread
From: Akinobu Mita @ 2019-05-12 15:54 UTC (permalink / raw)
  To: linux-nvme, linux-kernel
  Cc: Akinobu Mita, Johannes Berg, Keith Busch, Jens Axboe,
	Christoph Hellwig, Sagi Grimberg, Minwoo Im, Kenneth Heitke

This enables to collect snapshot of controller information via device
coredump mechanism.  The nvme device coredump is triggered when command
timeout occurs, and can also be triggered by writing sysfs attribute.

After finishing the nvme device coredump, the following files are created.

 - regs: NVMe controller registers (00h to 4Fh)
 - sq<qid>: Submission queue
 - cq<qid>: Completion queue
 - telemetry-ctrl-log: Telemetry controller-initiated log (if available)
 - data: Empty

The device coredump mechanism currently allows drivers to create only a
single coredump file, so this also provides a new function that allows
drivers to create several device coredump files in one crashed device.

* v3
- Merge 'add telemetry log page definisions' patch and 'add facility to
  check log page attributes' patch
- Copy struct nvme_telemetry_log_page_hdr from the latest nvme-cli
- Add BUILD_BUG_ON for the size of struct nvme_telemetry_log_page_hdr
- Fix typo s/machanism/mechanism/ in commit log
- Fix max transfer size calculation for get log page
- Add function comments
- Extract 'enable to trigger device coredump by hand' patch
- Don't try to get telemetry log when admin queue is not available
- Avoid deadlock in .coredump callback

* v2
- Add Reviewed-by tag.
- Add patch to fix typo in comment
- Remove unneeded braces.
- Allocate device_entry followed by an array of devcd_file elements.
- Add telemetry log page definisions
- Add facility to check log page attributes
- Exclude the doorbell registers from register dump.
- Save controller registers in a binary format instead of a text format.
- Create an empty 'data' file in the device coredump.
- Save telemetry controller-initiated log if available
- Make coredump procedure into two phases (before resetting controller and
  after resetting as soon as admin queue is available).

Akinobu Mita (7):
  devcoredump: use memory_read_from_buffer
  devcoredump: fix typo in comment
  devcoredump: allow to create several coredump files in one device
  nvme: add basic facility to get telemetry log page
  nvme-pci: add device coredump infrastructure
  nvme-pci: trigger device coredump on command timeout
  nvme-pci: enable to trigger device coredump by hand

 drivers/base/devcoredump.c  | 168 +++++++++------
 drivers/nvme/host/Kconfig   |   1 +
 drivers/nvme/host/core.c    |   3 +
 drivers/nvme/host/nvme.h    |   1 +
 drivers/nvme/host/pci.c     | 494 ++++++++++++++++++++++++++++++++++++++++++--
 include/linux/devcoredump.h |  33 +++
 include/linux/nvme.h        |  17 ++
 7 files changed, 644 insertions(+), 73 deletions(-)

Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Jens Axboe <axboe@fb.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Minwoo Im <minwoo.im.dev@gmail.com>
Cc: Kenneth Heitke <kenneth.heitke@intel.com>
-- 
2.7.4


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2019-05-14 14:06 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-12 15:54 [PATCH v3 0/7] nvme-pci: support device coredump Akinobu Mita
2019-05-12 15:54 ` [PATCH v3 1/7] devcoredump: use memory_read_from_buffer Akinobu Mita
2019-05-13 15:28   ` Chaitanya Kulkarni
2019-05-12 15:54 ` [PATCH v3 2/7] devcoredump: fix typo in comment Akinobu Mita
2019-05-13 15:24   ` Chaitanya Kulkarni
2019-05-12 15:54 ` [PATCH v3 3/7] devcoredump: allow to create several coredump files in one device Akinobu Mita
2019-05-12 15:54 ` [PATCH v3 4/7] nvme: add basic facility to get telemetry log page Akinobu Mita
2019-05-13 15:34   ` Chaitanya Kulkarni
2019-05-14 14:04     ` Akinobu Mita
2019-05-12 15:54 ` [PATCH v3 5/7] nvme-pci: add device coredump infrastructure Akinobu Mita
2019-05-13 13:50   ` Keith Busch
2019-05-13 15:01     ` Akinobu Mita
2019-05-13 14:02   ` Christoph Hellwig
2019-05-13 15:01     ` Akinobu Mita
2019-05-12 15:54 ` [PATCH v3 6/7] nvme-pci: trigger device coredump on command timeout Akinobu Mita
2019-05-13 13:52   ` Keith Busch
2019-05-12 15:54 ` [PATCH v3 7/7] nvme-pci: enable to trigger device coredump by hand Akinobu Mita
     [not found] ` <CGME20190512155533epcas4p110edff15ebf5b2efae32e43f0f10ab59@epcms2p5>
2019-05-13  7:41   ` [PATCH v3 6/7] nvme-pci: trigger device coredump on command timeout Minwoo Im
2019-05-13 14:59     ` Akinobu Mita
     [not found] ` <CGME20190512155540epcas4p14c15eb86b08dcd281e9a93a4fc190800@epcms2p1>
2019-05-13  7:46   ` [PATCH v3 5/7] nvme-pci: add device coredump infrastructure Minwoo Im
2019-05-13 15:23     ` Chaitanya Kulkarni
2019-05-14 14:06       ` Akinobu Mita

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).