]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RDMA/core: use IOVA-based DMA mapping for bvec RDMA operations
authorChuck Lever <chuck.lever@oracle.com>
Wed, 28 Jan 2026 00:53:57 +0000 (19:53 -0500)
committerLeon Romanovsky <leon@kernel.org>
Wed, 28 Jan 2026 10:54:53 +0000 (05:54 -0500)
commit853e892076ba5666c81afbc86552e008280f9768
treed9f4891b12e523f87b93f1c29866a512cad5112c
parent5e541553588d493bd9317bc8a8c1ab85cbddc2c5
RDMA/core: use IOVA-based DMA mapping for bvec RDMA operations

The bvec RDMA API maps each bvec individually via dma_map_phys(),
requiring an IOTLB sync for each mapping. For large I/O operations
with many bvecs, this overhead becomes significant.

The two-step IOVA API (dma_iova_try_alloc / dma_iova_link /
dma_iova_sync) allocates a contiguous IOVA range upfront, links
all physical pages without IOTLB syncs, then performs a single
sync at the end. This reduces IOTLB flushes from O(n) to O(1).

It also requires only a single output dma_addr_t compared to extra
per-input element storage in struct scatterlist.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260128005400.25147-3-cel@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/rw.c
include/rdma/rw.h