[PATCH 08/20] nvme: call nvme_identify_ns as the first thing in nvme_alloc_ns_block

Christoph Hellwig hch at lst.de
Tue Sep 29 14:30:14 EDT 2020


On Tue, Sep 29, 2020 at 01:39:31AM -0700, Sagi Grimberg wrote:
>
>> Check if the namespace actually exists as the very first thing and don't
>> bother with any extra work if not.  This should speed up and simplify
>> the sequential scanning for NVMe 1.0 devices.
>
> What exactly is this speeding up? Its just a few assignments+allocations

Yes, that is all.  Although some of the block layer teardown can
be a little more costly with various atomics.  Nothing really major,
but just simple work avoidance for a non-failure early exit path.



More information about the Linux-nvme mailing list