Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/3] blk-mq/nvme: improve nvme-pci reset handler
@ 2020-05-30 13:52 Ming Lei
  2020-05-30 13:52 ` [PATCH V2 1/3] blk-mq: add API of blk_mq_queue_frozen Ming Lei
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ming Lei @ 2020-05-30 13:52 UTC (permalink / raw)
  To: Jens Axboe, linux-block, linux-nvme, Christoph Hellwig
  Cc: Sagi Grimberg, Dongli Zhang, Ming Lei, Alan Adamson, Keith Busch,
	Max Gurtovoy

Hi,

For nvme-pci, after controller is recovered, in-flight IOs are waited
before updating nr hw queues. If new controller error happens during
this period, nvme-pci driver deletes the controller and fails in-flight
IO. This way is too violent, and not friendly from user viewpoint.

Add APIs for checking if queue is frozen, and replace nvme_wait_freeze
in nvme-pci reset handler with checking if all ns queues are frozen &
controller disabled. Then a fresh new reset can be scheduled for
handling new controller error during waiting for in-flight IO completion.

So deleting controller & failing IOs can be avoided in this situation.

Without this patches, when fail io timeout injection is run, the
controller can be removed very quickly. With this patch, no controller
removing can be observed, and controller can recover to normal state
after stopping to inject io timeout failure.

V2:
	- give up after retrying enough times
	- add comment on breaking because of shutdown

Ming Lei (3):
  blk-mq: add API of blk_mq_queue_frozen
  nvme: add nvme_frozen
  nvme-pci: make nvme reset more reliable

 block/blk-mq.c           |  6 +++++
 drivers/nvme/host/core.c | 17 +++++++++++++-
 drivers/nvme/host/nvme.h |  3 +++
 drivers/nvme/host/pci.c  | 50 +++++++++++++++++++++++++++++++++-------
 include/linux/blk-mq.h   |  1 +
 5 files changed, 68 insertions(+), 9 deletions(-)

Cc: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Keith Busch <kbusch@kernel.org>
Cc: Max Gurtovoy <maxg@mellanox.com>


-- 
2.25.2


_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

end of thread, other threads:[~2020-06-11  7:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-30 13:52 [PATCH V2 0/3] blk-mq/nvme: improve nvme-pci reset handler Ming Lei
2020-05-30 13:52 ` [PATCH V2 1/3] blk-mq: add API of blk_mq_queue_frozen Ming Lei
2020-05-30 13:52 ` [PATCH V2 2/3] nvme: add nvme_frozen Ming Lei
2020-05-30 13:52 ` [PATCH V2 3/3] nvme-pci: make nvme reset more reliable Ming Lei
2020-06-11  7:27 ` [PATCH V2 0/3] blk-mq/nvme: improve nvme-pci reset handler Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox