Re: [PATCH rdma-rc] RDMA/rxe: Bound MR copy and flush chunks to MR pages

From: Zhu Yanjun

Date: Sun Nov 29 2026 - 23:57:56 EST



在 2026/11/29 20:10, Andrew Stellman 写道:
On Sun, Nov 29, 2026 at 11:16:37AM -0800, Zhu Yanjun wrote:
Can you find anywhere else where mr->ibmr.page_size is assigned a
different value?
Yes. ib_map_mr_sg() in drivers/infiniband/core/verbs.c sets the
ib_mr's page_size to its caller's page_size argument before it calls
the driver's map_mr_sg. For rxe that's mr->ibmr.page_size, and
rxe_map_mr_sg() reads it back with mr_page_size(). rxe_map_mr_sg()
accepts a page size smaller than PAGE_SIZE when PAGE_SIZE is a
multiple of it.

In rxe, mr_page_size() always returns PAGE_SIZE and never changes.

As a result, these commits only add implementation complexity without

bringing any practical benefit to rxe. If you intend to support different page_size

values in rxe, patches implementing that feature would be very welcome.

From my perspective, however, the current patch does not yet actually deliver that capability.

Thanks,

Yanjun Zhu


One in-tree caller that passes 4 KiB is nvme_rdma_map_sg_fr() in
drivers/nvme/host/rdma.c, which calls ib_map_mr_sg(..., SZ_4K). On a
64 KiB-page kernel that's a fast-reg MR with 4 KiB MR pages.

This is from reading current mainline. I haven't run NVMe over RDMA
on rxe; in my tests the 4 KiB MR page size was set by the test-only
hook.

--
Best Regards,
Yanjun.Zhu