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

This enables to capture snapshot of controller information via device
coredump machanism, and it helps diagnose and debug issues.

The nvme device coredump is triggered when command timeout occurs, and
creates the following coredump files.

 - 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

(I don't have the NVMe device that supports telemetry log page for now, so
capturing telemetry log is untested.)

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.

* 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.h: add telemetry log page definisions
  nvme: add facility to check log page attributes
  nvme-pci: add device coredump support
  nvme-pci: trigger device coredump on command timeout

 drivers/base/devcoredump.c  | 168 ++++++++++------
 drivers/nvme/host/Kconfig   |   1 +
 drivers/nvme/host/core.c    |   2 +
 drivers/nvme/host/nvme.h    |   1 +
 drivers/nvme/host/pci.c     | 460 ++++++++++++++++++++++++++++++++++++++++++--
 include/linux/devcoredump.h |  33 ++++
 include/linux/nvme.h        |  25 +++
 7 files changed, 617 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>
-- 
2.7.4


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

end of thread, other threads:[~2019-05-08 16:02 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-07 16:58 [PATCH v2 0/7] nvme-pci: support device coredump Akinobu Mita
2019-05-07 16:58 ` [PATCH v2 1/7] devcoredump: use memory_read_from_buffer Akinobu Mita
2019-05-07 16:58 ` [PATCH v2 2/7] devcoredump: fix typo in comment Akinobu Mita
2019-05-07 16:58 ` [PATCH v2 3/7] devcoredump: allow to create several coredump files in one device Akinobu Mita
2019-05-07 17:35   ` Heitke, Kenneth
2019-05-08 15:40     ` Akinobu Mita
2019-05-07 16:58 ` [PATCH v2 4/7] nvme.h: add telemetry log page definisions Akinobu Mita
2019-05-07 17:28   ` Heitke, Kenneth
2019-05-08 15:42     ` Akinobu Mita
2019-05-07 17:52   ` Heitke, Kenneth
2019-05-08 15:54     ` Akinobu Mita
2019-05-07 16:58 ` [PATCH v2 5/7] nvme: add facility to check log page attributes Akinobu Mita
2019-05-07 16:58 ` [PATCH v2 6/7] nvme-pci: add device coredump support Akinobu Mita
2019-05-07 17:07   ` Keith Busch
2019-05-07 17:44   ` Heitke, Kenneth
2019-05-07 20:31   ` Heitke, Kenneth
2019-05-07 21:22     ` Keith Busch
2019-05-08 15:56       ` Akinobu Mita
     [not found]   ` <CGME20190507171318epcas5p129bb73b39447d62a7d266ed461687488@epcms2p3>
2019-05-08  0:25     ` Minwoo Im
2019-05-08 16:02       ` Akinobu Mita
2019-05-07 16:58 ` [PATCH v2 7/7] nvme-pci: trigger device coredump on command timeout Akinobu Mita
2019-05-07 17:43 ` [PATCH v2 0/7] nvme-pci: support device coredump Heitke, Kenneth

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).