Thread (45 messages) flat view 45 messages, 3 authors, 21d ago

Re: [PATCH v4 03/18] PCI/P2PDMA: Restrict the p2pmem search to pool backed providers

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2026-08-24 23:23:00
Also in: linux-iommu, linux-pci, lkml

On Fri, 21 Aug 2026 22:38:34 +0300, Leon Romanovsky [off-list ref] 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@nvidia.com>

-- 
Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help