* [PATCH] nvme: fix multipath batched completion accounting
@ 2024-05-21 17:05 Keith Busch
2024-05-21 19:37 ` Christoph Hellwig
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Keith Busch @ 2024-05-21 17:05 UTC (permalink / raw)
To: hch, sagi, linux-nvme; +Cc: axboe, Keith Busch
From: Keith Busch <kbusch@kernel.org>
Batched completions were missing the io stats accounting and bio trace
events. Move the common code to a helper and call it from the batched
and non-batched functions.
Fixes: d4d957b53d91ee ("nvme-multipath: support io stats on the mpath device")
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
drivers/nvme/host/core.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 954f850f113a1..79cdd34dfa18e 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -414,6 +414,14 @@ static inline void nvme_end_req_zoned(struct request *req)
}
}
+static inline void __nvme_end_req(struct request *req)
+{
+ nvme_end_req_zoned(req);
+ nvme_trace_bio_complete(req);
+ if (req->cmd_flags & REQ_NVME_MPATH)
+ nvme_mpath_end_request(req);
+}
+
static inline void nvme_end_req(struct request *req)
{
blk_status_t status = nvme_error_status(nvme_req(req)->status);
@@ -424,10 +432,7 @@ static inline void nvme_end_req(struct request *req)
else
nvme_log_error(req);
}
- nvme_end_req_zoned(req);
- nvme_trace_bio_complete(req);
- if (req->cmd_flags & REQ_NVME_MPATH)
- nvme_mpath_end_request(req);
+ __nvme_end_req(req);
blk_mq_end_request(req, status);
}
@@ -476,7 +481,7 @@ void nvme_complete_batch_req(struct request *req)
{
trace_nvme_complete_rq(req);
nvme_cleanup_cmd(req);
- nvme_end_req_zoned(req);
+ __nvme_end_req(req);
}
EXPORT_SYMBOL_GPL(nvme_complete_batch_req);
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] nvme: fix multipath batched completion accounting
2024-05-21 17:05 [PATCH] nvme: fix multipath batched completion accounting Keith Busch
@ 2024-05-21 19:37 ` Christoph Hellwig
2024-05-21 20:11 ` Sagi Grimberg
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2024-05-21 19:37 UTC (permalink / raw)
To: Keith Busch; +Cc: hch, sagi, linux-nvme, axboe, Keith Busch
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] nvme: fix multipath batched completion accounting
2024-05-21 17:05 [PATCH] nvme: fix multipath batched completion accounting Keith Busch
2024-05-21 19:37 ` Christoph Hellwig
@ 2024-05-21 20:11 ` Sagi Grimberg
2024-05-22 0:55 ` Chaitanya Kulkarni
2024-05-23 9:59 ` Hannes Reinecke
3 siblings, 0 replies; 5+ messages in thread
From: Sagi Grimberg @ 2024-05-21 20:11 UTC (permalink / raw)
To: Keith Busch, hch, linux-nvme; +Cc: axboe, Keith Busch
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] nvme: fix multipath batched completion accounting
2024-05-21 17:05 [PATCH] nvme: fix multipath batched completion accounting Keith Busch
2024-05-21 19:37 ` Christoph Hellwig
2024-05-21 20:11 ` Sagi Grimberg
@ 2024-05-22 0:55 ` Chaitanya Kulkarni
2024-05-23 9:59 ` Hannes Reinecke
3 siblings, 0 replies; 5+ messages in thread
From: Chaitanya Kulkarni @ 2024-05-22 0:55 UTC (permalink / raw)
To: Keith Busch
Cc: axboe@kernel.dk, hch@lst.de, linux-nvme@lists.infradead.org,
sagi@grimberg.me, Keith Busch
On 5/21/24 10:05, Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
>
> Batched completions were missing the io stats accounting and bio trace
> events. Move the common code to a helper and call it from the batched
> and non-batched functions.
>
> Fixes: d4d957b53d91ee ("nvme-multipath: support io stats on the mpath device")
> Signed-off-by: Keith Busch <kbusch@kernel.org>
>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] nvme: fix multipath batched completion accounting
2024-05-21 17:05 [PATCH] nvme: fix multipath batched completion accounting Keith Busch
` (2 preceding siblings ...)
2024-05-22 0:55 ` Chaitanya Kulkarni
@ 2024-05-23 9:59 ` Hannes Reinecke
3 siblings, 0 replies; 5+ messages in thread
From: Hannes Reinecke @ 2024-05-23 9:59 UTC (permalink / raw)
To: Keith Busch, hch, sagi, linux-nvme; +Cc: axboe, Keith Busch
On 5/21/24 19:05, Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
>
> Batched completions were missing the io stats accounting and bio trace
> events. Move the common code to a helper and call it from the batched
> and non-batched functions.
>
> Fixes: d4d957b53d91ee ("nvme-multipath: support io stats on the mpath device")
> Signed-off-by: Keith Busch <kbusch@kernel.org>
> ---
> drivers/nvme/host/core.c | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-23 10:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-21 17:05 [PATCH] nvme: fix multipath batched completion accounting Keith Busch
2024-05-21 19:37 ` Christoph Hellwig
2024-05-21 20:11 ` Sagi Grimberg
2024-05-22 0:55 ` Chaitanya Kulkarni
2024-05-23 9:59 ` Hannes Reinecke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox