aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Christopherson <sean.j.christopherson@intel.com>2018-12-28 03:33:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-28 15:11:46 -0500
commit6a90a83f1d1957647581ca48caa1f7cc4fa44f8d (patch)
tree7a76c7b1232ce57f9d6b429d22ed236d0b503e76
parent5eb570a8d9248e0c1358078a59916d0e337e695b (diff)
mm/mmu_notifier.c: remove mmu_notifier_synchronize()
Contrary to its name, mmu_notifier_synchronize() does not synchronize the notifier's SRCU instance, but rather waits for RCU callbacks to finish. i.e. it invokes rcu_barrier(). The RCU documentation is quite clear on this matter, explicitly calling out that rcu_barrier() does not imply synchronize_rcu(). As there are no callers of mmu_notifier_synchronize() and it's unclear whether any user of mmu_notifier_call_srcu() will ever want to barrier on their callbacks, simply remove the function. Link: http://lkml.kernel.org/r/20181106134705.14197-1-sean.j.christopherson@intel.com Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Jérôme Glisse <jglisse@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/mmu_notifier.h1
-rw-r--r--mm/mmu_notifier.c7
2 files changed, 0 insertions, 8 deletions
diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
index 9893a6432adf..913c3c13e36e 100644
--- a/include/linux/mmu_notifier.h
+++ b/include/linux/mmu_notifier.h
@@ -420,7 +420,6 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
420 420
421extern void mmu_notifier_call_srcu(struct rcu_head *rcu, 421extern void mmu_notifier_call_srcu(struct rcu_head *rcu,
422 void (*func)(struct rcu_head *rcu)); 422 void (*func)(struct rcu_head *rcu));
423extern void mmu_notifier_synchronize(void);
424 423
425#else /* CONFIG_MMU_NOTIFIER */ 424#else /* CONFIG_MMU_NOTIFIER */
426 425
diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c
index 5119ff846769..755466cd289a 100644
--- a/mm/mmu_notifier.c
+++ b/mm/mmu_notifier.c
@@ -35,13 +35,6 @@ void mmu_notifier_call_srcu(struct rcu_head *rcu,
35} 35}
36EXPORT_SYMBOL_GPL(mmu_notifier_call_srcu); 36EXPORT_SYMBOL_GPL(mmu_notifier_call_srcu);
37 37
38void mmu_notifier_synchronize(void)
39{
40 /* Wait for any running method to finish. */
41 srcu_barrier(&srcu);
42}
43EXPORT_SYMBOL_GPL(mmu_notifier_synchronize);
44
45/* 38/*
46 * This function can't run concurrently against mmu_notifier_register 39 * This function can't run concurrently against mmu_notifier_register
47 * because mm->mm_users > 0 during mmu_notifier_register and exit_mmap 40 * because mm->mm_users > 0 during mmu_notifier_register and exit_mmap