[PATCH 1/1] nvme-fabrics: Generate uevent on namespace AENs

Hannes Reinecke hare at suse.de
Thu Jun 24 03:49:20 PDT 2021


On 4/30/21 6:21 PM, Keith Busch wrote:
> On Fri, Apr 30, 2021 at 05:14:55AM +0000, Rao, Vinay wrote:
>> + Madhu
>>
>> Hi Chaitanya, 
>>
>> Some of the AEN's like ANA state change and Name Space attribute change events are of interest outside the NVME driver. 
>>
>> It would be good to consider these events to be propagated up to user space. I am not yet convinced on how propagating
>> this above to user space is problematic.
> 
> The namespace attribute change event pairs with the Changed Namespace
> List log, and reading that log will change the result for a subsequent
> reader. User space racing with the kernel on a log access when there are
> read side effects creates non-deterministic behavior, and that is
> problematic.
> 
It would, if we were relying on the Changed Namespace List log.
But in the end we're just reading it to clear the AEN flag; the contents
are completely immaterial to us as we're doing a full namespace scan
afterwards anyway.
So I don't think that that'll be a problem for us.

What will be problematic, though, is if we were to allow userspace to
register an AEN; as soon as the controller allows more than one pending
AERs there nothing preventing it from doing so.
If he does our internal states will be messed up as we're not receiving
all events. I'd rather error out any attempt here, but then we can't do
a full passthrough, and I guess things like SPDK might become unhappy.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		           Kernel Storage Architect
hare at suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer



More information about the Linux-nvme mailing list