* [PATCH v6] nvme: Skip trace complete_rq on host path error
[not found] <CGME20260416010713epcms2p78575bd400f93f6edb7fe3f3ead5bf930@epcms2p7>
@ 2026-04-16 1:07 ` 전민식
2026-04-16 21:34 ` Chaitanya Kulkarni
2026-04-16 22:00 ` Keith Busch
0 siblings, 2 replies; 4+ messages in thread
From: 전민식 @ 2026-04-16 1:07 UTC (permalink / raw)
To: kbusch@kernel.org, hch@lst.de
Cc: axboe@kernel.dk, sagi@grimberg.me, linux-nvme@lists.infradead.org,
linux-kernel@vger.kernel.org, 전민식,
이은수, 칸찬
From cfd386c2d769552c4dd32ec8ff5233ef34f9830d Mon Sep 17 00:00:00 2001
From: Minsik Jeon <hmi.jeon@samsung.com>
Date: Thu, 16 Apr 2026 10:43:00 +0900
Subject: [PATCH v6] nvme: Skip trace complete_rq on host path error
we were checking host_pathing_error before calling nvme_setup_cmd().
This is caused the command setup to be skipped entirely when a pathing
error occurred, making it impossible to trace the nvme command via
trace_cmd nvme_complete_rq().
As a result, when nvme_complete_rq() logged a completion with cmdid=0,
it was impossible to correlate the completion with the nvme command
request.
This patch Skip trace_nvme_complete_rq() on NVMe host path error.
Co-authored-by: Beomsoo Kim <beomsooo.kim@samsung.com>
Co-authored-by: Eunsoo Lee <euns212.lee@samsung.com>
Co-authored-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
Signed-off-by: Minsik Jeon <hmi.jeon@samsung.com>
---
drivers/nvme/host/core.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 1e33af94c24b..e92c97fad305 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -454,11 +454,10 @@ void nvme_end_req(struct request *req)
blk_mq_end_request(req, status);
}
-void nvme_complete_rq(struct request *req)
+void __nvme_complete_rq(struct request *req)
{
struct nvme_ctrl *ctrl = nvme_req(req)->ctrl;
- trace_nvme_complete_rq(req);
nvme_cleanup_cmd(req);
/*
@@ -493,6 +492,12 @@ void nvme_complete_rq(struct request *req)
return;
}
}
+
+void nvme_complete_rq(struct request *req)
+{
+ trace_nvme_complete_rq(req);
+ __nvme_complete_rq(req);
+}
EXPORT_SYMBOL_GPL(nvme_complete_rq);
void nvme_complete_batch_req(struct request *req)
@@ -513,7 +518,7 @@ blk_status_t nvme_host_path_error(struct request *req)
{
nvme_req(req)->status = NVME_SC_HOST_PATH_ERROR;
blk_mq_set_request_complete(req);
- nvme_complete_rq(req);
+ __nvme_complete_rq(req);
return BLK_STS_OK;
}
EXPORT_SYMBOL_GPL(nvme_host_path_error);
--
2.52.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v6] nvme: Skip trace complete_rq on host path error
2026-04-16 1:07 ` [PATCH v6] nvme: Skip trace complete_rq on host path error 전민식
@ 2026-04-16 21:34 ` Chaitanya Kulkarni
2026-04-16 22:00 ` Keith Busch
1 sibling, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2026-04-16 21:34 UTC (permalink / raw)
To: hmi.jeon@samsung.com
Cc: axboe@kernel.dk, sagi@grimberg.me, linux-nvme@lists.infradead.org,
kbusch@kernel.org, hch@lst.de, linux-kernel@vger.kernel.org,
이은수, 칸찬
On 4/15/26 18:07, 전민식 wrote:
> From cfd386c2d769552c4dd32ec8ff5233ef34f9830d Mon Sep 17 00:00:00 2001
> From: Minsik Jeon<hmi.jeon@samsung.com>
> Date: Thu, 16 Apr 2026 10:43:00 +0900
> Subject: [PATCH v6] nvme: Skip trace complete_rq on host path error
>
> we were checking host_pathing_error before calling nvme_setup_cmd().
> This is caused the command setup to be skipped entirely when a pathing
> error occurred, making it impossible to trace the nvme command via
> trace_cmd nvme_complete_rq().
>
> As a result, when nvme_complete_rq() logged a completion with cmdid=0,
> it was impossible to correlate the completion with the nvme command
> request.
>
> This patch Skip trace_nvme_complete_rq() on NVMe host path error.
>
> Co-authored-by: Beomsoo Kim<beomsooo.kim@samsung.com>
> Co-authored-by: Eunsoo Lee<euns212.lee@samsung.com>
> Co-authored-by: Steven Seungcheol Lee<sc108.lee@samsung.com>
> Signed-off-by: Minsik Jeon<hmi.jeon@samsung.com>
> ---
Is it possible to send this patch using git send-email ?
Also, do you see any performance difference after this change ?
I don't expect any but it's better to document if any since
this is in the fast path.
-ck
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v6] nvme: Skip trace complete_rq on host path error
2026-04-16 1:07 ` [PATCH v6] nvme: Skip trace complete_rq on host path error 전민식
2026-04-16 21:34 ` Chaitanya Kulkarni
@ 2026-04-16 22:00 ` Keith Busch
2026-04-17 1:00 ` 전민식
1 sibling, 1 reply; 4+ messages in thread
From: Keith Busch @ 2026-04-16 22:00 UTC (permalink / raw)
To: 전민식
Cc: hch@lst.de, axboe@kernel.dk, sagi@grimberg.me,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
이은수, 칸찬
On Thu, Apr 16, 2026 at 10:07:13AM +0900, 전민식 wrote:
> Co-authored-by: Beomsoo Kim <beomsooo.kim@samsung.com>
> Co-authored-by: Eunsoo Lee <euns212.lee@samsung.com>
> Co-authored-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
...
> -void nvme_complete_rq(struct request *req)
> +void __nvme_complete_rq(struct request *req)
You're missing the "static" declaration, which was present in the
original suggestion:
https://lore.kernel.org/linux-nvme/acVCnozG1WKPkq1L@kbusch-mbp/
Should I just apply my local copy? I think it's an original patch from
me at this point.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Re: [PATCH v6] nvme: Skip trace complete_rq on host path error
2026-04-16 22:00 ` Keith Busch
@ 2026-04-17 1:00 ` 전민식
0 siblings, 0 replies; 4+ messages in thread
From: 전민식 @ 2026-04-17 1:00 UTC (permalink / raw)
To: Keith Busch
Cc: hch@lst.de, axboe@kernel.dk, sagi@grimberg.me,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
이은수, 칸찬
On Thu, Apr 16, 2026 at 22:00 UTC, Keith Busch wrote:
> You're missing the "static" declaration, which was present in the
> original suggestion:
>
> https://lore.kernel.org/linux-nvme/acVCnozG1WKPkq1L@kbusch-mbp/
>
> Should I just apply my local copy? I think it's an original patch from
> me at this point.
Please go ahead and apply your local copy.
I appreciate your help in finalizing the patch.
Thanks,
Minsik Jeon
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-17 1:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20260416010713epcms2p78575bd400f93f6edb7fe3f3ead5bf930@epcms2p7>
2026-04-16 1:07 ` [PATCH v6] nvme: Skip trace complete_rq on host path error 전민식
2026-04-16 21:34 ` Chaitanya Kulkarni
2026-04-16 22:00 ` Keith Busch
2026-04-17 1:00 ` 전민식
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox