diff options
| author | Leon Romanovsky <leonro@nvidia.com> | 2025-04-28 12:22:19 +0300 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2025-05-12 06:06:51 -0400 |
| commit | 1efe8c0670d6a6883faa09c9abc746c741f5664a (patch) | |
| tree | 3a907cb76abc324660a0ffd7b02887b742dca5de /include/rdma | |
| parent | eedd5b1276e76d6b260a7a77a149ef5155aa76f0 (diff) | |
RDMA/core: Convert UMEM ODP DMA mapping to caching IOVA and page linkage
Reuse newly added DMA API to cache IOVA and only link/unlink pages
in fast path for UMEM ODP flow.
Tested-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Diffstat (limited to 'include/rdma')
| -rw-r--r-- | include/rdma/ib_umem_odp.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/include/rdma/ib_umem_odp.h b/include/rdma/ib_umem_odp.h index a345c26a745d..2a24bf791c10 100644 --- a/include/rdma/ib_umem_odp.h +++ b/include/rdma/ib_umem_odp.h @@ -8,24 +8,17 @@ #include <rdma/ib_umem.h> #include <rdma/ib_verbs.h> -#include <linux/hmm.h> +#include <linux/hmm-dma.h> struct ib_umem_odp { struct ib_umem umem; struct mmu_interval_notifier notifier; struct pid *tgid; - /* An array of the pfns included in the on-demand paging umem. */ - unsigned long *pfn_list; + struct hmm_dma_map map; /* - * An array with DMA addresses mapped for pfns in pfn_list. - * The lower two bits designate access permissions. - * See ODP_READ_ALLOWED_BIT and ODP_WRITE_ALLOWED_BIT. - */ - dma_addr_t *dma_list; - /* - * The umem_mutex protects the page_list and dma_list fields of an ODP + * The umem_mutex protects the page_list field of an ODP * umem, allowing only a single thread to map/unmap pages. The mutex * also protects access to the mmu notifier counters. */ |
