linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH rdma-next v3 0/4] Improve ODP by using HMM API
@ 2020-09-30 16:38 Leon Romanovsky
  2020-09-30 16:38 ` [PATCH rdma-next v3 1/4] IB/core: Improve ODP to use hmm_range_fault() Leon Romanovsky
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Leon Romanovsky @ 2020-09-30 16:38 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, linux-rdma, Yishai Hadas, Christoph Hellwig

From: Leon Romanovsky <leonro@nvidia.com>

Changelog:
v3:
 * Improve control flow in ib_umem_odp_map_dma_single_page() to be clearer and safer.
 * Replace pr_debug() by ibdev_dbg()
v2: https://lore.kernel.org/lkml/20200922082104.2148873-1-leon@kernel.org
 * Patch #1 – Drop redundant mask.
 * Patch #4 – Use address and length directly from umem_odp.
v1: https://lore.kernel.org/lkml/20200917112152.1075974-1-leon@kernel.org
 * Cleaned code.
 * Support a potential valid dma_address of NULL by flags detection,
   note was added to clarify things as was asked.
 * Fix 80 character lines in few places.
v0: https://lore.kernel.org/lkml/20200914113949.346562-1-leon@kernel.org

Based on:
https://lore.kernel.org/lkml/20200914112653.345244-1-leon@kernel.org/

---------------------------------------------------------------------------------------
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      | 293 ++++++++++--------------
 drivers/infiniband/hw/mlx5/mlx5_ib.h    |   5 +
 drivers/infiniband/hw/mlx5/mr.c         |  14 +-
 drivers/infiniband/hw/mlx5/odp.c        |  48 ++--
 include/rdma/ib_umem_odp.h              |  21 +-
 include/uapi/rdma/ib_user_ioctl_verbs.h |   1 +
 7 files changed, 182 insertions(+), 201 deletions(-)

--
2.26.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-01 20:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-30 16:38 [PATCH rdma-next v3 0/4] Improve ODP by using HMM API Leon Romanovsky
2020-09-30 16:38 ` [PATCH rdma-next v3 1/4] IB/core: Improve ODP to use hmm_range_fault() Leon Romanovsky
2020-09-30 16:38 ` [PATCH rdma-next v3 2/4] IB/core: Enable ODP sync without faulting Leon Romanovsky
2020-09-30 16:38 ` [PATCH rdma-next v3 3/4] RDMA/mlx5: Extend advice MR to support non faulting mode Leon Romanovsky
2020-09-30 16:38 ` [PATCH rdma-next v3 4/4] RDMA/mlx5: Sync device with CPU pages upon ODP MR registration Leon Romanovsky
2020-10-01 20:01 ` [PATCH rdma-next v3 0/4] Improve ODP by using HMM API Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).