• Keith Busch's avatar
    nvme-pci: place descriptor addresses in iod · 7846c1b5
    Keith Busch authored
    The 'struct nvme_iod' space is appended at the end of the preallocated
    'struct request', and padded to the cache line size. This leaves some
    free memory (in most kernel configs) up for grabs.
    
    Instead of appending the nvme data descriptor addresses after the
    scatterlist, inline these for free within struct nvme_iod. There is now
    enough space in the mempool for 128 possibe segments.
    
    And without increasing the size of the preallocated requests, we can
    hold up to 5 PRP descriptor elements, allowing the driver to increase
    its max transfer size to 8MB.
    Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    7846c1b5
pci.c 92.9 KB