All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: "hch@lst.de" <hch@lst.de>
Cc: 전민식 <hmi.jeon@samsung.com>,
	"Justin Tee" <justintee8345@gmail.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"sven@kernel.org" <sven@kernel.org>,
	"j@jannau.net" <j@jannau.net>, "neal@gompa.dev" <neal@gompa.dev>,
	"sagi@grimberg.me" <sagi@grimberg.me>,
	"justin.tee@broadcom.com" <justin.tee@broadcom.com>,
	"nareshgottumukkala83@gmail.com" <nareshgottumukkala83@gmail.com>,
	"paul.ely@broadcom.com" <paul.ely@broadcom.com>,
	"James Smart" <james.smart@broadcom.com>,
	"kch@nvidia.com" <kch@nvidia.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"asahi@lists.linux.dev" <asahi@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	이은수 <euns212.lee@samsung.com>, 칸찬 <joshi.k@samsung.com>
Subject: Re: [PATCH v5] nvme: Skip trace complete_rq on host path error
Date: Thu, 26 Mar 2026 08:43:28 -0600	[thread overview]
Message-ID: <acVGECskf5pg3_MY@kbusch-mbp> (raw)
In-Reply-To: <20260326143124.GA17507@lst.de>

On Thu, Mar 26, 2026 at 03:31:24PM +0100, hch@lst.de wrote:
> On Thu, Mar 26, 2026 at 08:28:46AM -0600, Keith Busch wrote:
> > On Thu, Mar 26, 2026 at 03:51:52PM +0900, 전민식 wrote:
> > >  {
> > >  	struct nvme_ctrl *ctrl = nvme_req(req)->ctrl;
> > >  
> > > -	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 != NVME_SC_HOST_PATH_ERROR)
> > > +		trace_nvme_complete_rq(req);
> > > +
> > 
> > Well, how do we know a controller doesnn't actually return that status
> > code? I was just suggesting to skip the trace for the condition we never
> > dispatched the command. An added bonus is we don't need a mostly
> > unnecessary 'if' check on every IO.
> 
> The 7?h error values were added for host use.  The description of
> the section in the spec suggests this, but isn't actually as clear
> as I would like it.  I wonder if we need to verify that controller
> don't incorrectly return it, as that could cause some problems?

Yeah, the spec is not very clear on their use. It just defines the codes
and a one sentence description, and then never mentioned again. I think
it allows the possibility for the controller to internally complete a
command with such status from some undefined OOB mechanism. I'm not sure
why the host needs to have their own self-generated status codes anyway
since it can already attach whatever arbitrary flags it wants to its
private data, like how we use NVME_REQ_CANCELLED.

Anyway if a controller did return it for whatever reason, even if it is
a bug, we'd want to see it in the trace.

  reply	other threads:[~2026-03-26 14:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260320052101epcms2p42ae135da60b36685e9b7fca6849b57a6@epcms2p4>
2026-03-20  5:21 ` [PATCH] nvme: Move nvme_setup_cmd before hot_pathing 전민식
2026-03-20 13:43   ` Kanchan Joshi
2026-03-23  1:04     ` [PATCH v2] " 전민식
2026-03-22  7:16   ` [PATCH] " kernel test robot
2026-03-22  8:22   ` kernel test robot
2026-03-22 12:09   ` kernel test robot
2026-03-24 23:55   ` Justin Tee
2026-03-25  6:33     ` [PATCH v3] nvme: Add nvme_setup_cmd to host_path_error 전민식
2026-03-25 18:37       ` Justin Tee
2026-03-25 19:03         ` Keith Busch
2026-03-26  1:44           ` [PATCH v4] nvme: Skip trace complete_rq on host path error 전민식
2026-03-26  6:14             ` hch
2026-03-26  6:51               ` [PATCH v5] " 전민식
2026-03-26 14:20                 ` hch
2026-03-26 14:28                 ` Keith Busch
2026-03-26 14:31                   ` hch
2026-03-26 14:43                     ` Keith Busch [this message]
2026-03-27  6:19                       ` 전민식
2026-03-27  6:37                       ` 전민식
     [not found] <CGME20260415084107epcms2p71b9c0d252180653ab96a9f5f2121be71@epcms2p7>
2026-04-15  8:41 ` 전민식
2026-04-15 14:43   ` Keith Busch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=acVGECskf5pg3_MY@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=asahi@lists.linux.dev \
    --cc=axboe@kernel.dk \
    --cc=euns212.lee@samsung.com \
    --cc=hch@lst.de \
    --cc=hmi.jeon@samsung.com \
    --cc=j@jannau.net \
    --cc=james.smart@broadcom.com \
    --cc=joshi.k@samsung.com \
    --cc=justin.tee@broadcom.com \
    --cc=justintee8345@gmail.com \
    --cc=kch@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=nareshgottumukkala83@gmail.com \
    --cc=neal@gompa.dev \
    --cc=paul.ely@broadcom.com \
    --cc=sagi@grimberg.me \
    --cc=sven@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.