| From: |
| Chuck Lever <cel-AT-kernel.org> |
| To: |
| Jason Gunthorpe <jgg-AT-nvidia.com>, Leon Romanovsky <leon-AT-kernel.org>, Christoph Hellwig <hch-AT-lst.de> |
| Subject: |
| [PATCH v2 0/4] Add a bio_vec based API to core/rw.c |
| Date: |
| Tue, 20 Jan 2026 09:31:20 -0500 |
| Message-ID: |
| <20260120143124.1822121-1-cel@kernel.org> |
| Cc: |
| NeilBrown <neilb-AT-ownmail.net>, Jeff Layton <jlayton-AT-kernel.org>, Olga Kornievskaia <okorniev-AT-redhat.com>, Dai Ngo <dai.ngo-AT-oracle.com>, Tom Talpey <tom-AT-talpey.com>, <linux-rdma-AT-vger.kernel.org>, <linux-nfs-AT-vger.kernel.org>, Chuck Lever <chuck.lever-AT-oracle.com> |
| Archive-link: |
| Article |
From: Chuck Lever <chuck.lever@oracle.com>
This series introduces a bio_vec based API for RDMA read and write
operations in the RDMA core, eliminating unnecessary scatterlist
conversions for callers that already work with bvecs.
Current users of rdma_rw_ctx_init() must convert their native data
structures into scatterlists. For subsystems like svcrdma that
maintain data in bvec format, this conversion adds overhead both in
CPU cycles and memory footprint. The new API accepts bvec arrays
directly.
For hardware RDMA devices, the implementation uses the IOVA-based
DMA mapping API to reduce IOTLB synchronization overhead from O(n)
per-page syncs to a single O(1) sync after all mappings complete.
Software RDMA devices (rxe, siw) continue using virtual addressing.
The series includes MR registration support for bvec arrays,
enabling iWARP devices and the force_mr debug parameter. The MR
path reuses existing ib_map_mr_sg() infrastructure by constructing
a synthetic scatterlist from the bvec DMA addresses.
The final patch adds the first consumer for the new API: svcrdma.
Based on v6.19-rc6.
---
Changes since v1:
- Simplify rw.c by using bvec iters internally
- IOVA mapping produces a contiguous DMA address range
- Clarify the comment that documents struct svc_rdma_rw_ctxt
- svcrdma now uses pre-allocated bio_vec arrays
Chuck Lever (4):
RDMA/core: add bio_vec based RDMA read/write API
RDMA/core: use IOVA-based DMA mapping for bvec RDMA operations
RDMA/core: add MR support for bvec-based RDMA operations
svcrdma: use bvec-based RDMA read/write API
drivers/infiniband/core/rw.c | 463 ++++++++++++++++++++++++++++++
include/rdma/ib_verbs.h | 42 +++
include/rdma/rw.h | 26 ++
net/sunrpc/xprtrdma/svc_rdma_rw.c | 136 +++++----
4 files changed, 605 insertions(+), 62 deletions(-)
--
2.52.0