[PATCH V2 1/2] nvme: Include AEN CQE.DW1 in NVME_AEN uevents
Clay Mayers
Clay.Mayers at kioxia.com
Fri Oct 28 17:47:44 PDT 2022
> From: Sagi Grimberg <sagi at 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.
More information about the Linux-nvme
mailing list