public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Clay Mayers <Clay.Mayers@kioxia.com>
To: Sagi Grimberg <sagi@grimberg.me>, Christoph Hellwig <hch@lst.de>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"Keith Busch" <kbusch@kernel.org>, Jens Axboe <axboe@fb.com>
Subject: RE: [PATCH V2 1/2] nvme: Include AEN CQE.DW1 in NVME_AEN uevents
Date: Sat, 29 Oct 2022 00:47:44 +0000	[thread overview]
Message-ID: <a02c1a5f6fb348e99928ee8538d9f936@kioxia.com> (raw)
In-Reply-To: <3d95023d-58c1-3d8b-768a-6a986db00e62@grimberg.me>

> From: Sagi Grimberg <sagi@grimberg.me>
> Sent: Tuesday, October 25, 2022 9:00 AM
> >> What happens today is a warning is logged and the log page is left
> >> unread.  The patch closes that gap allowing ZDC AENs to be enable
> >> and handled in user space for things like RocksDB's ZenFS.  Kernel
> >> clients will also need a way to handle them, but can't that be a
> >> different patch series?
> >
> > The problem is how the NVMe AENs work - the are raised and then the
> > AEN command completion is delivered and they are cleared by reading
> > the log page.  But if we deliver them to userspace, we lose the pending
> > state of the AEN for the kernel.  Right now that is not an issue,
> > but we lose all chance of ever making use of that information in
> > the kernel.  So maybe the answer is to handle the AEN in the kernel,
> > read the changed zones log in the kernel, and then send an uevent
> > for all changes zones to userspace.
> 
> That is what I was thinking... I feel we had this discussion before
> on a different AEN (maybe it was something that wanted to get ANA
> info to userspace)...

If you're thinking of this: https://lore.kernel.org/linux-nvme/BL0PR13MB4291371B4FD44B93D187B2319C419@BL0PR13MB4291.namprd13.prod.outlook.com/
I share the concern of both user and kernel reading the AEN referenced
log page.   The solution should look more like what Christoph outlined
above with the kernel reading the log page and routing results.

However, the ZDC AEN is not at the controller level.  It supplies the
NSID so only the code writing to the namespace can be notified and
only it will read the log page.  Host-aware zoned devices can't be
partitioned so responsibility wouldn't be split across user mode,
kernel or multiple applications.

Yes, the kernel doesn't get to look at my namespace's ZDC entries and
It has no reason to.  In the future when the kernel is processing ZDC
entries for a namespace, I shouldn’t expect a uevent or to see its ZDC
entries just like two apps using different namespaces.



  reply	other threads:[~2022-10-29  0:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 22:39 [PATCH V2 0/2] nvme: Support user mode processing of ZNS Zone Changed AEN clay.mayers
2022-09-29 22:39 ` [PATCH V2 1/2] nvme: Include AEN CQE.DW1 in NVME_AEN uevents clay.mayers
2022-10-17 13:23   ` Christoph Hellwig
2022-10-18 20:12     ` Clay Mayers
2022-10-25 15:38       ` Christoph Hellwig
2022-10-25 15:59         ` Sagi Grimberg
2022-10-29  0:47           ` Clay Mayers [this message]
2022-09-29 22:39 ` [PATCH V2 2/2] nvme: All AENs of type notify generate an NVME_AEN uevent clay.mayers
2022-10-04  1:48 ` [PATCH V2 0/2] nvme: Support user mode processing of ZNS Zone Changed AEN Chaitanya Kulkarni
2022-10-04 19:09   ` Clay Mayers
2022-10-07  4:59     ` Chaitanya Kulkarni
2022-10-06 11:33 ` Sagi Grimberg
2022-10-06 20:16   ` Clay Mayers

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=a02c1a5f6fb348e99928ee8538d9f936@kioxia.com \
    --to=clay.mayers@kioxia.com \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --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