Skip to content

Improve ODP by using HMM API

Leon Romanovsky linux-rdma lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4IB/core: Improve ODP to use hmm_range_fault()drivers/infiniband/Kconfig drivers/infiniband/core/umem_odp.c drivers/infiniband/hw/mlx5/odp.c +1 more+123 -1975 replies
2/4IB/core: Enable ODP sync without faultingdrivers/infiniband/core/umem_odp.c drivers/infiniband/hw/mlx5/odp.c include/rdma/ib_umem_odp.h+27 -125 replies
3/4RDMA/mlx5: Extend advice MR to support non faulting modedrivers/infiniband/hw/mlx5/mr.c drivers/infiniband/hw/mlx5/odp.c include/uapi/rdma/ib_user_ioctl_verbs.h+9 -20 replies
4/4RDMA/mlx5: Sync device with CPU pages upon ODP MR registrationdrivers/infiniband/hw/mlx5/mlx5_ib.h drivers/infiniband/hw/mlx5/mr.c drivers/infiniband/hw/mlx5/odp.c+34 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH rdma-next 0/4] Improve ODP by using HMM API

From: Leon Romanovsky <[email protected]>

Based on:
https://lore.kernel.org/lkml/[email protected]/

---------------------------------------------------------------------------------------
From Yishai:

This series improves ODP performance by moving to use the HMM API as of below.

The get_user_pages_remote() functionality was replaced by HMM:
- No need anymore to allocate and free memory to hold its output per call.
- No need anymore to use the put_page() to unpin the pages.
- The logic to detect contiguous pages is done based on the returned order from HMM, no need to run per page, and evaluate.

Moving to use the HMM enables to reduce page faults in the system by using the snapshot mode. This mode allows existing pages in the CPU to become presented to the device without faulting.

This non-faulting mode may be used explicitly by an application with some new option of advice MR (i.e. PREFETCH_NO_FAULT) and is used upon ODP MR registration internally as part of initiating the device page table.

To achieve the above, internal changes in the ODP data structures were done and some flows were cleaned-up/adapted accordingly.

Thanks

Yishai Hadas (4):
IB/core: Improve ODP to use hmm_range_fault() IB/core: Enable ODP sync without faulting
RDMA/mlx5: Extend advice MR to support non faulting mode RDMA/mlx5: Sync device with CPU pages upon ODP MR registration

 drivers/infiniband/Kconfig              |   1 +
 drivers/infiniband/core/umem_odp.c      | 286 ++++++++++--------------
 drivers/infiniband/hw/mlx5/mlx5_ib.h    |   6 +
 drivers/infiniband/hw/mlx5/mr.c         |  14 +-
 drivers/infiniband/hw/mlx5/odp.c        |  50 +++--
 include/rdma/ib_umem_odp.h              |  21 +-
 include/uapi/rdma/ib_user_ioctl_verbs.h |   1 +
 7 files changed, 178 insertions(+), 201 deletions(-)

--
2.26.2