diff options
| author | Jacob Moroni <jmoroni@google.com> | 2026-10-14 16:21:44 +0000 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2026-10-15 11:38:16 -0400 |
| commit | 9165b3f7372bc1547549687f3a113c047ed94a36 (patch) | |
| tree | 0bd276bdfbb22d17783a9b6fa340b55a01d5c474 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 9bcf45bfcaf83aed81b5fb12f0edf4c16e73e02e (diff) | |
RDMA/irdma: Check MR contiguity before PBLE alloc
The original logic would attempt to allocate PBLEs, then would
check whether the region was contiguous _after_, and if so,
would free the PBLEs and use a direct mapping instead.
These unnecessary temporary PBLE allocations can technically
fail (PBLEs are a finite resource), which can cause an MR
registration failure even if the region is contiguous and
should have succeeded.
Fix this by checking whether the region is contiguous before
allocating any PBLEs. This also provides an opportunity to
consolidate some of the rereg_mr logic and use the existing
ib_umem_is_contiguous() helper.
Tested on GEN3 HW with a test program that does an extensive
sweep of MR size/alignment/hugepage combinations, but most
importantly, first/last byte reachable and -1/+1 unreachable
when using contig regions with both aligned and unaligned start
addresses, plus a kprobe on irdma_get_pble() to ensure we're
actually hitting the new path.
Ring MRs still have their own logic. That will be addressed next.
Signed-off-by: Jacob Moroni <jmoroni@google.com>
Link: https://patch.msgid.link/20261014162144.4053279-1-jmoroni@google.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
