[PATCH V2 1/2] nvme: Include AEN CQE.DW1 in NVME_AEN uevents

Clay Mayers Clay.Mayers at kioxia.com
Tue Oct 18 13:12:59 PDT 2022


> From: Christoph Hellwig <hch at lst.de>
> Sent: Monday, October 17, 2022 6:24 AM
> 
> On Thu, Sep 29, 2022 at 03:39:54PM -0700, clay.mayers at kioxia.com wrote:
> > From: Clay Mayers <clay.mayers at kioxia.com>
> >
> > There are AENs from alternate command sets that include
> > extra data in their AEN's CQE.DW1.  For example, the ZNS
> > Zone-Descriptor-Changed AEN uses it to indicate the NSID
> > of the event's log page.
> >
> > NVME_AEN uevent now includes the value of CQE.DW1 as a new
> > property.  It is only included when non-zero to keep previously
> > existing uevents unmodified.
> 
> I don't think we can actually do this.  If we ever want to handle
> Zone Excursions or any other event where the device can chane the
> Zone Descriptor we need to handle this AEN in the kernel and thus
> control the clearing of the even by reading the associated log page,
> so we can't just send it on to userspace.  This is a bit of a sad
> state of affairs but unavoidable due to the NVMe AEN design.

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 limitation is, the ZDC AEN is enabled/disabled at the controller
level but it's essentially a namespace level event.  Once on for one
namespace, zone descriptor changes have to be handled as an AEN
for all namespaces.




More information about the Linux-nvme mailing list