[PATCH 0/4] nvme: start keep-alive after admin queue setup

Keith Busch kbusch at kernel.org
Fri Oct 20 08:30:28 PDT 2023


On Fri, Oct 20, 2023 at 04:25:56PM +0200, Hannes Reinecke wrote:
> Hi all,
> 
> Setting up I/O queues might take quite some time on larger and/or
> busy setups, so KATO might expire on the admin queue before all
> I/O queues can be setup.
> This patchset fixes this issue by moving the calls to starting
> and stopping KATO into the quiesce/unquiesce functions.
> That requires some refactoring/alignment with some transport
> drivers which do not always quiesce and unquiesce the admin
> queue.
> 
> As usual, comments and reviews are welcome.

The pci transport doesn't care about keep-alive, so I don't think we
should force everyone to have to consider it.

Wouldn't you want to start the keep-alive on the connecting state
transition? Something like this:

---
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 62612f87aafa2..a44b1206b20ad 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -583,6 +583,8 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,
        } else if (ctrl->state == NVME_CTRL_CONNECTING &&
                old_state == NVME_CTRL_RESETTING) {
                nvme_start_failfast_work(ctrl);
+               if (ctrl->ops->flags & NVME_F_FABRICS) {
+                       nvme_start_keep_alive(ctrl);
        }
        return changed;
 }
--



More information about the Linux-nvme mailing list