[to-be-updated] mm-mmu_notifier-rename-mmu_notifier_synchronize-to-_barrier.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/mmu_notifier.c: rename mmu_notifier_synchronize() to <...>_barrier()
has been removed from the -mm tree.  Its filename was
     mm-mmu_notifier-rename-mmu_notifier_synchronize-to-_barrier.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
Subject: mm/mmu_notifier.c: rename mmu_notifier_synchronize() to <...>_barrier()

... and update its comment to explicitly reference its association with
mmu_notifier_call_srcu().

Contrary to its name, mmu_notifier_synchronize() does not synchronize the
notifier's SRCU instance, but rather waits for RCU callbacks to finishe,
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().  The misnomer could lean an unwary developer to
incorrectly assume that mmu_notifier_synchronize() can be used in
conjunction with mmu_notifier_unregister_no_release() to implement a
variation of mmu_notifier_unregister() that synchronizes SRCU without
invoking ->release.  A Documentation-allergic and hasty developer could be
further confused by the fact that rcu_barrier() is indeed a pass-through
to synchronize_rcu()...  in tiny SRCU.

[akpm@xxxxxxxxxxxxxxxxxxxx: fix include/linux/mmu_notifier.h declaration, per Matthew]
Link: http://lkml.kernel.org/r/20181105192955.26305-1-sean.j.christopherson@xxxxxxxxx
Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Jérôme Glisse <jglisse@xxxxxxxxxx>
Cc: Oded Gabbay <oded.gabbay@xxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/mmu_notifier.h |    2 +-
 mm/mmu_notifier.c            |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

--- a/mm/mmu_notifier.c~mm-mmu_notifier-rename-mmu_notifier_synchronize-to-_barrier
+++ a/mm/mmu_notifier.c
@@ -35,12 +35,12 @@ void mmu_notifier_call_srcu(struct rcu_h
 }
 EXPORT_SYMBOL_GPL(mmu_notifier_call_srcu);
 
-void mmu_notifier_synchronize(void)
+void mmu_notifier_barrier(void)
 {
-	/* Wait for any running method to finish. */
+	/* Wait for any running RCU callbacks (see above) to finish. */
 	srcu_barrier(&srcu);
 }
-EXPORT_SYMBOL_GPL(mmu_notifier_synchronize);
+EXPORT_SYMBOL_GPL(mmu_notifier_barrier);
 
 /*
  * This function can't run concurrently against mmu_notifier_register
--- a/include/linux/mmu_notifier.h~mm-mmu_notifier-rename-mmu_notifier_synchronize-to-_barrier
+++ a/include/linux/mmu_notifier.h
@@ -420,7 +420,7 @@ static inline void mmu_notifier_mm_destr
 
 extern void mmu_notifier_call_srcu(struct rcu_head *rcu,
 				   void (*func)(struct rcu_head *rcu));
-extern void mmu_notifier_synchronize(void);
+extern void mmu_notifier_barrier(void);
 
 #else /* CONFIG_MMU_NOTIFIER */
 
_

Patches currently in -mm which might be from sean.j.christopherson@xxxxxxxxx are





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux