]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xprtrdma: Scale receive batch size with credit window
authorChuck Lever <chuck.lever@oracle.com>
Fri, 6 Mar 2026 21:56:27 +0000 (16:56 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 13 Apr 2026 19:05:00 +0000 (12:05 -0700)
commit93b4791adb1017b2b079b4a453e7159e101a7e55
treeb0b3bb3420693f9ea0e00878c3a0f75252e35202
parent7a079ab57c4eeff241d9abfc1ec6477cb90a6206
xprtrdma: Scale receive batch size with credit window

The fixed RPCRDMA_MAX_RECV_BATCH of 7 results in frequent
small ib_post_recv batches during high-rate workloads. With
a 128-slot credit window, receives are reposted every 7th
completion, each batch incurring atomic serialization and a
doorbell write.

Replace the fixed batch constant with a per-endpoint value
scaled to 25% of the negotiated credit window. For a typical
128-credit connection this raises the batch from 7 to 32,
reducing doorbell frequency by roughly 4x and amortizing the
per-batch atomic and MMIO costs over a larger group of
receive WRs.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/xprtrdma/frwr_ops.c
net/sunrpc/xprtrdma/verbs.c
net/sunrpc/xprtrdma/xprt_rdma.h