[PATCH 5/7] nvme-pci: use a better encoding for small prp pool allocations
Leon Romanovsky
leon at kernel.org
Tue May 13 00:39:50 PDT 2025
On Tue, May 13, 2025 at 09:00:21AM +0200, Christoph Hellwig wrote:
> Add a separate flag to encode that the transfer is using the small
> page sized pool, and use a normal 0..n count for the number of
> descriptors.
>
> Contains improvements and suggestions from Kanchan Joshi
> <joshi.k at samsung.com> and Leon Romanovsky <leonro at nvidia.com>.
>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> ---
> drivers/nvme/host/pci.c | 82 ++++++++++++++++++++---------------------
> 1 file changed, 39 insertions(+), 43 deletions(-)
<...>
> -static void nvme_free_prps(struct nvme_queue *nvmeq, struct request *req)
> +static inline struct dma_pool *nvme_dma_pool(struct nvme_queue *nvmeq,
> + struct nvme_iod *iod)
> +{
You probably want __always_inline and not inline here.
> + if (iod->flags & IOD_SMALL_DESCRIPTOR)
> + return nvmeq->descriptor_pools.small;
> + return nvmeq->descriptor_pools.large;
> +}
Thanks,
Reviewed-by: Leon Romanovsky <leon at kernel.org>
More information about the Linux-nvme
mailing list