[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250924224319.4557-1-achaudhary@purestorage.com>
Date: Wed, 24 Sep 2025 15:43:18 -0700
From: Amit Chaudhary <achaudhary@...estorage.com>
To: achaudhary@...estorage.com,
Keith Busch <kbusch@...nel.org>,
Jens Axboe <axboe@...nel.dk>,
Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>
Cc: mkhalfella@...estorage.com,
randyj@...estorage.com,
jmeneghi@...hat.com,
emilne@...hat.com,
linux-nvme@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] nvme-multipath: Skip nr_active increments in RETRY disposition
For queue-depth I/O policy, this patch fixes unbalanced I/Os across
nvme multipaths.
Issue Description:
The RETRY disposition incorrectly increments ns->ctrl->nr_active
counter and reinitializes iostat start-time. In such cases nr_active
counter never goes back to zero until that path disconnects and
reconnects.
Such a path is not chosen for new I/Os if multiple RETRY cases on a given
a path cause its queue-depth counter to be artificially higher compared
to other paths. This leads to unbalanced I/Os across paths.
The patch skips calling nvme_mpath_start_request() on a RETRY disposition
if nvme_req(rq)->retries counter is non-zero. This avoids reincrementing
nr_active and also from restarting io_stat start time.
base-commit: e989a3da2d371a4b6597ee8dee5c72e407b4db7a
Fixes: d4d957b53d91eeb ("nvme-multipath: support io stats on the mpath device")
Signed-off-by: Amit Chaudhary <achaudhary@...estorage.com>
Reviewed-by: Randy Jennings <randyj@...estorage.com>
---
drivers/nvme/host/nvme.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 102fae6a231c..6ca6529ba83a 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -1150,7 +1150,7 @@ static inline void nvme_hwmon_exit(struct nvme_ctrl *ctrl)
static inline void nvme_start_request(struct request *rq)
{
- if (rq->cmd_flags & REQ_NVME_MPATH)
+ if ((rq->cmd_flags & REQ_NVME_MPATH) && (!nvme_req(rq)->retries))
nvme_mpath_start_request(rq);
blk_mq_start_request(rq);
}
--
2.43.0
Powered by blists - more mailing lists