[PATCH 5/7] nvme-pci: use a better encoding for small prp pool allocations

Keith Busch kbusch at kernel.org
Wed May 14 06:06:17 PDT 2025


On Wed, May 14, 2025 at 07:12:21AM +0200, Christoph Hellwig wrote:
> 
> Something only vaguely related:  do you remember why the metadata SGL
> descriptors are limited to just the small pool?  It would be nice
> to support as many metadata as data entries, which we'd almost get
> by using the larger one (we'd still be one off).

The only way I'd expect to exceed what the small pool provides is
through merging, but that feature was more of an afterthought.

My intended use case was to support zero-copy for user passthrough. The
metadata there is a virtually contiguous buffer. You'd need very large
IO in order for metadata to require more than few segments, so the small
pool's 15 segments  was sufficient. If you are doing large passthrough
IO (>2MB), then you should be using huge pages, in which case we'd still
only see one or two segments for the metadata.

But if you are trying to merge dozens of requests with metadata into
one, then yeah, the small pool isn't large enough to accomodate. If you
want to support that use case, then we can certainly change the driver
to use the large pool when more than 15 integrity segments are required.



More information about the Linux-nvme mailing list