Re: [PATCH for-next v2 0/2] RDMA/rxe: Prefetching pages with explicit ODP

From: Daisuke Matsuda
Date: Sun May 04 2025 - 05:23:42 EST


On 2025/05/04 2:08, Zhu Yanjun wrote:
在 2025/5/3 15:42, Daisuke Matsuda 写道:
There is ibv_advise_mr(3) that can be used by applications to optimize
memory access. This series enables the feature on rxe driver, which has
already been available in mlx5.

There is a tiny change on the rdma-core util.
cf. https://github.com/linux-rdma/rdma-core/pull/1605

Hi, Daisuke

Thanks a lot for your efforts to this patch series. It is very nice. With this patch series, we can make prefetch for ODP MRs of RXE.

I read through this patch series. And it seems fine with me.^_^

IIRC, you have added ODP testcases in rdma-core. To verify this prefetch work well for ODP MRs, can you add this synchronous/asynchronous prefetch to the ODP testcases in rdma-core?

Thus, we can verify this patch series. And in the future, we can use these testcases to confirm this prefetch feature work well.

To now, it seems that no tool can verify this prefetch feature.

Hi, Thank you for taking a look!

There are already relevant testcases implemented in ./tests/test_odp.py:
- test_odp_sync_prefetch_rc_traffic
- test_odp_async_prefetch_rc_traffic
- test_odp_prefetch_sync_no_page_fault_rc_traffic
- test_odp_prefetch_async_no_page_fault_rc_traffic
On my node (x86-64/linux-6.15.0-rc1+), this series can pass all these tests.

Other than that, this feature is required by librpma as far as I know.
Though it is not maintained anymore, perhaps this could also be used for testing.
cf. https://github.com/pmem/rpma

Thanks,
Daisuke


Thanks a lot.
Zhu Yanjun


Daisuke Matsuda (2):
   RDMA/rxe: Implement synchronous prefetch for ODP MRs
   RDMA/rxe: Enable asynchronous prefetch for ODP MRs

  drivers/infiniband/sw/rxe/rxe.c     |   7 ++
  drivers/infiniband/sw/rxe/rxe_loc.h |  10 ++
  drivers/infiniband/sw/rxe/rxe_odp.c | 165 ++++++++++++++++++++++++++++
  3 files changed, 182 insertions(+)