]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: Improve ODP to use hmm_range_fault()
authorYishai Hadas <yishaih@nvidia.com>
Wed, 30 Sep 2020 16:38:25 +0000 (19:38 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 1 Oct 2020 19:39:54 +0000 (16:39 -0300)
commit660640435cac7f02d870e8b6bfc9d5bc8f635a6b
treeced2407f4fa17dbd933eb1f1b5c128531a09cda2
parentd874e45d621309449e9a75e067aee1e84dd3fac0
IB/core: Improve ODP to use hmm_range_fault()

Move to use hmm_range_fault() instead of get_user_pags_remote() to improve
performance in a few aspects:

This includes:
- Dropping the need to allocate and free memory to hold its output

- No need any more to use put_page() to unpin the pages

- The logic to detect contiguous pages is done based on the returned
  order, no need to run per page and evaluate.

In addition, moving to use hmm_range_fault() enables to reduce page faults
in the system with it's snapshot mode, this will be introduced in next
patches from this series.

As part of this, cleanup some flows and use the required data structures
to work with hmm_range_fault().

Link: https://lore.kernel.org/r/20200930163828.1336747-2-leon@kernel.org
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/Kconfig
drivers/infiniband/core/umem_odp.c
drivers/infiniband/hw/mlx5/odp.c
include/rdma/ib_umem_odp.h