[PATCH 0/6] Support per command retry timer

Sagi Grimberg <[email protected]>
Newsgroups org.infradead.lists.linux-nvme
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.