Re: [PATCH v4 03/18] PCI/P2PDMA: Restrict the p2pmem search to pool backed providers
From: Jason Gunthorpe
Date: Mon Aug 24 2026 - 19:23:14 EST
On Fri, 21 Aug 2026 22:38:34 +0300, Leon Romanovsky <leon@xxxxxxxxxx> wrote:
> pci_p2pmem_find_many() exists to pick a provider that the caller will
> then allocate from with pci_alloc_p2pmem(), which goes straight to the
> gen_pool:
>
> ret = (void *)gen_pool_alloc_owner(p2pdma->pool, size, (void **) &ref);
>
> pci_has_p2pmem() does not ask for that pool, only for the published flag.
> The two used to be equivalent, because a provider could only exist by way
> of pci_p2pdma_add_resource(), which always creates the pool.
>
> [...]
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
--
Jason