From nobody Thu Apr 2 22:24:11 2026 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E15E3336885 for ; Thu, 26 Mar 2026 06:51:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.34 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774507920; cv=none; b=CubQkqFR66ihM1a0hkiOf/anUyN0zCOXRhKt+Lt/Ds4raf0jklJILczDWkdIj/EiysntrO5RWrtkaZfOaSuzZm2llzhpOQYvxksAoI4gzSdCUSVtyOlWnFyIxGyxEfhJPyV5KlLLT/7SISeT2r6N8KcR3iIkYW4SnTDaFoYYHrU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774507920; c=relaxed/simple; bh=dE0rJeHmvGnWJJc06YkHRpd4+wA6dCpJPEZglXjGh8Y=; h=Mime-Version:Subject:From:To:CC:In-Reply-To:Message-ID:Date: Content-Type:References; b=iquTci3lkDmnS8qNcuIPtg49MKBhvMtSGrtFqXHWI7hhZ99e1r6nRmrmqlXX+pW7fddmRxXb+bvvA76qP7J4s4wmzXGSfJ2MO2w8woyKijxonEedysY8mxZGbW4qLWRCOpaAXhD39+HG3ZyLIq+8zKIdmap08z3BjUOt5SdjgJc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=hp3bM6Q5; arc=none smtp.client-ip=203.254.224.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="hp3bM6Q5" Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20260326065154epoutp041d8ec3749b7cb86b5c7e21a6a62d9b54~gUYvuc0M22819028190epoutp04M for ; Thu, 26 Mar 2026 06:51:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20260326065154epoutp041d8ec3749b7cb86b5c7e21a6a62d9b54~gUYvuc0M22819028190epoutp04M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1774507914; bh=6sxavwtg7kXYFeYgNiXv1vBn4QtD0M9SE4RLwM9smpQ=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=hp3bM6Q5Wtoaa5fu+1lqCUt42fm9pK4vAVB4U8qH5R21+BFvtcztShDkyJXj3XcuA 75h2Xt1ItbBWIe8MZ4jOrzik5Fmsr5Fo9hSoRF76lp+q0IU2/djWCLFM2YxD/j0tB7 8Toi1DxmguV6FovRQApQdPWJp4+cWOR80Qq1sIaA= Received: from epsnrtp01.localdomain (unknown [182.195.42.153]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPS id 20260326065153epcas2p1c255f43757bd4f0cc2e6addcad57b21f~gUYu2V8pX0236102361epcas2p1M; Thu, 26 Mar 2026 06:51:53 +0000 (GMT) Received: from epcas2p4.samsung.com (unknown [182.195.38.199]) by epsnrtp01.localdomain (Postfix) with ESMTP id 4fhDw935Vvz6B9mf; Thu, 26 Mar 2026 06:51:53 +0000 (GMT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Subject: [PATCH v5] nvme: Skip trace complete_rq on host path error Reply-To: hmi.jeon@samsung.com Sender: =?UTF-8?B?7KCE66+87Iud?= From: =?UTF-8?B?7KCE66+87Iud?= To: "hch@lst.de" CC: Keith Busch , Justin Tee , "axboe@kernel.dk" , "sven@kernel.org" , "j@jannau.net" , "neal@gompa.dev" , "sagi@grimberg.me" , "justin.tee@broadcom.com" , "nareshgottumukkala83@gmail.com" , "paul.ely@broadcom.com" , James Smart , "kch@nvidia.com" , "linux-arm-kernel@lists.infradead.org" , "linux-nvme@lists.infradead.org" , "asahi@lists.linux.dev" , "linux-kernel@vger.kernel.org" , =?UTF-8?B?7J207J2A7IiY?= , =?UTF-8?B?7Lm47LCs?= , =?UTF-8?B?7KCE66+87Iud?= X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20260326061443.GA23850@lst.de> X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20260326065152epcms2p51a18d3bbecb6eb6dc2ddba09651e5152@epcms2p5> Date: Thu, 26 Mar 2026 15:51:52 +0900 X-CMS-MailID: 20260326065152epcms2p51a18d3bbecb6eb6dc2ddba09651e5152 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P cpgsPolicy: CPGSC10-223,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20260320052101epcms2p42ae135da60b36685e9b7fca6849b57a6 References: <20260326061443.GA23850@lst.de> <20260320052101epcms2p42ae135da60b36685e9b7fca6849b57a6@epcms2p4> <945a3e98-ee75-453c-ae80-f3c9e3e57e58@gmail.com> <20260325063333epcms2p60954532c1b65a1665bad6dcdcfd7d62c@epcms2p6> <20260326014429epcms2p135ffd3c2b2fface6423d045e9614c262@epcms2p1> Hi hch, I added a comment about why I do trace skip if it's host path error. Thanks Regards, Minsik Jeon From 3ee001c00cb4c7843d7bbb0c11fcc1fafeded9b4 Mon Sep 17 00:00:00 2001 From: Minsik Jeon Date: Thu, 26 Mar 2026 11:09:57 +0900 Subject: [PATCH v5] 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=3D0, 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 Co-authored-by: Eunsoo Lee Co-authored-by: Steven Seungcheol Lee Signed-off-by: Minsik Jeon Reviewed-by: Christoph Hellwig --- drivers/nvme/host/core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 766e9cc4ffca..df5a47b8560d 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -458,7 +458,14 @@ void nvme_complete_rq(struct request *req) { struct nvme_ctrl *ctrl =3D nvme_req(req)->ctrl; =20 - trace_nvme_complete_rq(req); + /* + * The idea for these trace events was to match up commands + * dispatched to hardware with the hardware's posted response. + * So skip tracing for undispatched commands. + */ + if (nvme_req(req)->status !=3D NVME_SC_HOST_PATH_ERROR) + trace_nvme_complete_rq(req); + nvme_cleanup_cmd(req); =20 /* --=20 2.52.0