[PATVH V5] nvme-core: use xarray for ctrl ns tracking

Christoph Hellwig hch at lst.de
Fri Aug 14 02:57:11 EDT 2020


On Thu, Aug 13, 2020 at 11:33:41PM -0700, Sagi Grimberg wrote:
>
>> This patch replaces the ctrl->namespaces tracking from linked list to
>> xarray for better ns-mgmt on the host side. For host side
>> nvme_find_get_ns() falls into the fast path for NVMeOF passthru target.
>> This allows us to have better performance for NVMeOF passthru backend
>> since XArray has shows better performance numbers over having
>> a combination of read-write semapore read + linked list in the
>> nvme_find_get_ns() to find namespace in I/O patch from nsid specified
>> in the nvme_rw_cmd.
>
> This patch scares me to be honest...
>
> We have such non-trivial synchronization paths for ns scanning, ns
> removal, quiescing, freezing, path handling... I'm not even sure
> how many tests we'll need to verify that nothing breaks here.

Yes, same concern here.  That being said I have plans for this or
next merge window to fix a lot of crap in the block layer about
the bdev mutex to update the size, which should lead to major
simpliciations of the nvme ns scanning/removal path.  But I'd much
rather sort that our first rather than touching this code now.



More information about the Linux-nvme mailing list