]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/rdma/ib_umem_odp.h
Merge tag 'for_v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
[linux.git] / include / rdma / ib_umem_odp.h
index 259eb08dfc9e5193d942ba1f358594b721403458..0b1446fe2fab514fe8e5fa6d76b4aa1a490d6940 100644 (file)
@@ -67,15 +67,9 @@ struct ib_umem_odp {
        struct mutex            umem_mutex;
        void                    *private; /* for the HW driver to use. */
 
-       /* When false, use the notifier counter in the ucontext struct. */
-       bool mn_counters_active;
        int notifiers_seq;
        int notifiers_count;
 
-       /* A linked list of umems that don't have private mmu notifier
-        * counters yet. */
-       struct list_head no_private_counters;
-
        /* Tree tracking */
        struct umem_odp_node    interval_tree;
 
@@ -95,18 +89,17 @@ struct ib_ucontext_per_mm {
        struct ib_ucontext *context;
        struct mm_struct *mm;
        struct pid *tgid;
+       bool active;
 
        struct rb_root_cached umem_tree;
        /* Protects umem_tree */
        struct rw_semaphore umem_rwsem;
-       atomic_t notifier_count;
 
        struct mmu_notifier mn;
-       /* A list of umems that don't have private mmu notifier counters yet. */
-       struct list_head no_private_counters;
        unsigned int odp_mrs_count;
 
        struct list_head ucontext_list;
+       struct rcu_head rcu;
 };
 
 int ib_umem_odp_get(struct ib_umem_odp *umem_odp, int access);
@@ -162,12 +155,6 @@ static inline int ib_umem_mmu_notifier_retry(struct ib_umem_odp *umem_odp,
         * and the ucontext umem_mutex semaphore locked for read).
         */
 
-       /* Do not allow page faults while the new ib_umem hasn't seen a state
-        * with zero notifiers yet, and doesn't have its own valid set of
-        * private counters. */
-       if (!umem_odp->mn_counters_active)
-               return 1;
-
        if (unlikely(umem_odp->notifiers_count))
                return 1;
        if (umem_odp->notifiers_seq != mmu_seq)