public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Chaitanya Kulkarni <chaitanyak@nvidia.com>
Cc: Keith Busch <kbusch@meta.com>,
	"sagi@grimberg.me" <sagi@grimberg.me>, "hch@lst.de" <hch@lst.de>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH] nvme: implement support for nvme relaxed effects
Date: Tue, 6 Feb 2024 08:05:58 -0800	[thread overview]
Message-ID: <ZcJY5nSY4Zh690do@kbusch-mbp.mynextlight.net> (raw)
In-Reply-To: <4efa4fd8-b351-4948-a6c0-c5969c973bdb@nvidia.com>

On Tue, Feb 06, 2024 at 08:34:39AM +0000, Chaitanya Kulkarni wrote:
> >> +		if (effects & NVME_CMD_EFFECTS_CSER_MASK)
> >> +			effects &= ~NVME_CMD_EFFECTS_CSE_MASK;
> >>    	}
> 
> looking at the code again we are not using NVME_CMD_EFFECTS_CSER_MASK
> anywhere in the code to guarantee the admin-cmd exclusive execution
> guarantee, is there a specific reason for that ?
> 
> According to spec:-
> Figure 221: Command Supported and Effects data structure
> 
> *Bits 15:14
> *Value :- 01b
> *Definition :-
> The command associated with this structure should only be submitted
> when there is no outstanding Admin command that affects any namespace
> and no Admin command should be submitted that affects any namespace
> until this command is complete.
> 
> IOW, don't we need to freeze the admin queue when controller sets the CSER
> value to 01b until command is completed ? or it is not done/needed for
> a specific reason ?

The user is trying to submit an admin command, which wouldn't be
possible if we freeze the admin queue. We'd need another mechanism to
allow just the user's command, then a way to defeat it if that command
times out (we send admin commands as part of a reset sequence).

All that adds complications to the driver, and since there hasn't been
any communicated need to have the driver enforce this policy, we just
leave it up to user space to know what they're doing.


  reply	other threads:[~2024-02-06 16:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 19:17 [PATCH] nvme: implement support for nvme relaxed effects Keith Busch
2024-02-06  7:58 ` Chaitanya Kulkarni
2024-02-06  8:34   ` Chaitanya Kulkarni
2024-02-06 16:05     ` Keith Busch [this message]
2024-02-06 22:52       ` Chaitanya Kulkarni
2024-02-12  6:55 ` Christoph Hellwig

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=ZcJY5nSY4Zh690do@kbusch-mbp.mynextlight.net \
    --to=kbusch@kernel.org \
    --cc=chaitanyak@nvidia.com \
    --cc=hch@lst.de \
    --cc=kbusch@meta.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox