diff options
| author | Leon Romanovsky <leonro@nvidia.com> | 2026-08-30 14:16:21 +0300 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2026-10-09 14:13:24 -0500 |
| commit | ae57c51f0f4af3fff22171b01a92261f708eea87 (patch) | |
| tree | e27f2a86a959da668a755b88bf8f08b286659ee5 /tools/perf/scripts/python/task-analyzer.py | |
| parent | 1b82c6657e957f598b6e19e045e0bbd5cb370083 (diff) | |
PCI/P2PDMA: Restrict the p2pmem search to pool-backed providers
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.
pcim_p2pdma_init() broke that. It registers a provider for the DMABUF path
and never creates a pool, so pdev->p2pdma is set while p2pdma->pool stays
NULL. Nothing publishes such a provider today, so the search cannot return
one yet, but the flag alone no longer says what the caller needs.
Ask for the pool as well, so the search covers the providers its result is
used for. A later patch documents the pdev->p2pdma lifetime and RCU rules.
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Tushar Dave <tdave@nvidia.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://patch.msgid.link/20260830-batch-p2p-fixes-v1-3-5044e8dfbe2e@nvidia.com
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
