[PATCH v10 01/24] PCI/P2PDMA: Refactor the p2pdma mapping helpers
Baolu Lu
baolu.lu at linux.intel.com
Mon Apr 28 19:08:36 PDT 2025
On 4/28/25 17:22, Leon Romanovsky wrote:
> From: Christoph Hellwig<hch at lst.de>
>
> The current scheme with a single helper to determine the P2P status
> and map a scatterlist segment force users to always use the map_sg
> helper to DMA map, which we're trying to get away from because they
> are very cache inefficient.
>
> Refactor the code so that there is a single helper that checks the P2P
> state for a page, including the result that it is not a P2P page to
> simplify the callers, and a second one to perform the address translation
> for a bus mapped P2P transfer that does not depend on the scatterlist
> structure.
>
> Signed-off-by: Christoph Hellwig<hch at lst.de>
> Reviewed-by: Logan Gunthorpe<logang at deltatee.com>
> Acked-by: Bjorn Helgaas<bhelgaas at google.com>
> Tested-by: Jens Axboe<axboe at kernel.dk>
> Reviewed-by: Luis Chamberlain<mcgrof at kernel.org>
> Signed-off-by: Leon Romanovsky<leonro at nvidia.com>
Reviewed-by: Lu Baolu <baolu.lu at linux.intel.com>
More information about the Linux-nvme
mailing list