diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2019-08-06 20:15:43 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-08-21 20:58:18 -0300 |
commit | c571feca2dc972dc5afeba9036d08239f1c51af1 (patch) | |
tree | f907d8667244966af9369b0cd36c897c692f3209 /include/rdma | |
parent | daa138a58c802e7b4c2fb73f9b85bb082616ef43 (diff) | |
download | linux-c571feca2dc972dc5afeba9036d08239f1c51af1.tar.gz linux-c571feca2dc972dc5afeba9036d08239f1c51af1.tar.bz2 linux-c571feca2dc972dc5afeba9036d08239f1c51af1.zip |
RDMA/odp: use mmu_notifier_get/put for 'struct ib_ucontext_per_mm'
This is a significant simplification, no extra list is kept per FD, and
the interval tree is now shared between all the ucontexts, reducing
overhead if there are multiple ucontexts active.
Link: https://lore.kernel.org/r/20190806231548.25242-7-jgg@ziepe.ca
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include/rdma')
-rw-r--r-- | include/rdma/ib_umem_odp.h | 10 | ||||
-rw-r--r-- | include/rdma/ib_verbs.h | 3 |
2 files changed, 1 insertions, 12 deletions
diff --git a/include/rdma/ib_umem_odp.h b/include/rdma/ib_umem_odp.h index b37c674b7fe6..253df1a1fa54 100644 --- a/include/rdma/ib_umem_odp.h +++ b/include/rdma/ib_umem_odp.h @@ -122,20 +122,12 @@ static inline size_t ib_umem_odp_num_pages(struct ib_umem_odp *umem_odp) #ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING struct ib_ucontext_per_mm { - struct ib_ucontext *context; - struct mm_struct *mm; + struct mmu_notifier mn; struct pid *tgid; - bool active; struct rb_root_cached umem_tree; /* Protects umem_tree */ struct rw_semaphore umem_rwsem; - - struct mmu_notifier mn; - unsigned int odp_mrs_count; - - struct list_head ucontext_list; - struct rcu_head rcu; }; struct ib_umem_odp *ib_umem_odp_get(struct ib_udata *udata, unsigned long addr, diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index c2b39dda44cc..f659f4a02aa9 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -1417,9 +1417,6 @@ struct ib_ucontext { bool cleanup_retryable; - struct mutex per_mm_list_lock; - struct list_head per_mm_list; - struct ib_rdmacg_object cg_obj; /* * Implementation details of the RDMA core, don't use in drivers: |