Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Support per command retry timer
@ 2026-08-23  8:48 Sagi Grimberg
  2026-08-23  8:48 ` [PATCH 1/6] nvme-mpath: No need to protect req->bio with requeue_lock Sagi Grimberg
                   ` (6 more replies)
  0 siblings, 7 replies; 26+ messages in thread
From: Sagi Grimberg @ 2026-08-23  8:48 UTC (permalink / raw)
  To: linux-nvme, Christoph Hellwig, Keith Busch, Chaitanya Kulkarni
  Cc: Daniel Wagner, Shinichiro Kawasaki, Hannes Reinecke

We have a single retry timer per request queue. This means that different
commands will absorb the latest crd levels returned by the controller for
any command. This is both inacturate and may theoretically create a
starvation when the controller will return different crd for different
commands in specific patterns.

Fix this by adding a per-command retry timer, that is only accessed/modified
when a command RETRY disposition is performed.

Addionally, respect controller crd level also when failing over a request.

Lastly, add some infrastructure to be able to set different crd levels with
the error injection framework in order to be able to exercise these paths.
This includes nvmet configurable crdt[1,2,3] subsystem attributes, and host
crd level error injection.

The first patch is a standalone minor optimization that can be taken outside
of the patchset. The second patch adds a generic helper that allows for
multiple call-sites calculating the completion crd level, patches 3+4
implement per-command crd for both RETRY and FAILOVER dispositions. Patchs
5+6 are added primarily for testing.

Patch 7/6 is an RFC blktests addition to exercise the new code additions.

Sagi Grimberg (6):
  nvme-mpath: No need to protect req->bio with requeue_lock
  nvme: add nvme_crd_msecs helper
  nvme: add per request retry timer
  nvme-mpath: support controller crd when failing over request
  nvmet: Add support for configurable crdt (command retry delay)
    attributes
  nvme/fault-injection: Support for error injection with custom crd

 drivers/nvme/host/apple.c        |  1 +
 drivers/nvme/host/core.c         | 32 ++++++++---
 drivers/nvme/host/fault_inject.c |  8 ++-
 drivers/nvme/host/fc.c           |  1 +
 drivers/nvme/host/multipath.c    | 97 ++++++++++++++++++++++++++++++--
 drivers/nvme/host/nvme.h         | 14 +++++
 drivers/nvme/host/pci.c          |  1 +
 drivers/nvme/host/rdma.c         |  1 +
 drivers/nvme/host/tcp.c          |  1 +
 drivers/nvme/target/admin-cmd.c  |  4 ++
 drivers/nvme/target/configfs.c   | 62 ++++++++++++++++++++
 drivers/nvme/target/loop.c       |  1 +
 drivers/nvme/target/nvmet.h      |  1 +
 13 files changed, 209 insertions(+), 15 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2026-09-11 22:53 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-23  8:48 [PATCH 0/6] Support per command retry timer Sagi Grimberg
2026-08-23  8:48 ` [PATCH 1/6] nvme-mpath: No need to protect req->bio with requeue_lock Sagi Grimberg
2026-08-24 11:31   ` Hannes Reinecke
2026-08-24 15:53   ` John Garry
2026-09-02 13:39   ` Christoph Hellwig
2026-08-23  8:48 ` [PATCH 2/6] nvme: add nvme_crd_msecs helper Sagi Grimberg
2026-08-24 11:32   ` Hannes Reinecke
2026-09-02 13:40   ` Christoph Hellwig
2026-09-06  0:07     ` Sagi Grimberg
2026-08-23  8:48 ` [PATCH 3/6] nvme: add per request retry timer Sagi Grimberg
2026-08-24 13:25   ` Hannes Reinecke
2026-09-02 13:41   ` Christoph Hellwig
2026-09-06  0:09     ` Sagi Grimberg
2026-09-11 22:53       ` Sagi Grimberg
2026-08-23  8:49 ` [PATCH 4/6] nvme-mpath: support controller crd when failing over request Sagi Grimberg
2026-08-24 13:45   ` Hannes Reinecke
2026-08-24 14:23     ` Sagi Grimberg
2026-09-02 13:43   ` Christoph Hellwig
2026-09-06  0:15     ` Sagi Grimberg
2026-08-23  8:49 ` [PATCH 5/6] nvmet: Add support for configurable crdt (command retry delay) attributes Sagi Grimberg
2026-09-02 13:44   ` Christoph Hellwig
2026-09-06  0:20     ` Sagi Grimberg
2026-08-23  8:49 ` [PATCH 6/6] nvme/fault-injection: Support for error injection with custom crd Sagi Grimberg
2026-08-23  8:49 ` [PATCH 7/6 RFC] nvme: test per-command retry delay Sagi Grimberg
2026-08-30  8:23   ` Shin'ichiro Kawasaki
2026-08-30 20:55     ` Sagi Grimberg

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