linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] srcu mmu_notifier cleanup
@ 2012-09-05 11:12 Andrea Arcangeli
  2012-09-05 11:12 ` [PATCH] mm: mmu_notifier: make the mmu_notifier srcu static Andrea Arcangeli
  0 siblings, 1 reply; 2+ messages in thread
From: Andrea Arcangeli @ 2012-09-05 11:12 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, Xiao Guangrong, Sagi Grimberg, Peter Zijlstra,
	Haggai Eran

Hi Andrew,

while re-reading the code, I found an easy to overlook but badly
needed cleanup in the mmu notifier srcu patch.

We can't allow such a generic name to be non static (even if it works
fine at this time). Plus here "static" is so much better regardless of
the name.

This is incremental but feel free to fold this on onto the prev srcu
patch.

Thanks,
Andrea

Andrea Arcangeli (1):
  mm: mmu_notifier: make the mmu_notifier srcu static

 mm/mmu_notifier.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] mm: mmu_notifier: make the mmu_notifier srcu static
  2012-09-05 11:12 [PATCH] srcu mmu_notifier cleanup Andrea Arcangeli
@ 2012-09-05 11:12 ` Andrea Arcangeli
  0 siblings, 0 replies; 2+ messages in thread
From: Andrea Arcangeli @ 2012-09-05 11:12 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, Xiao Guangrong, Sagi Grimberg, Peter Zijlstra,
	Haggai Eran

The variable must be static especially given the variable name.

s/RCU/SRCU/ over a few comments.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
---
 mm/mmu_notifier.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c
index 35ff447..3775c90 100644
--- a/mm/mmu_notifier.c
+++ b/mm/mmu_notifier.c
@@ -20,7 +20,7 @@
 #include <linux/slab.h>
 
 /* global SRCU for all MMs */
-struct srcu_struct srcu;
+static struct srcu_struct srcu;
 
 /*
  * This function can't run concurrently against mmu_notifier_register
@@ -41,7 +41,7 @@ void __mmu_notifier_release(struct mm_struct *mm)
 	int id;
 
 	/*
-	 * RCU here will block mmu_notifier_unregister until
+	 * SRCU here will block mmu_notifier_unregister until
 	 * ->release returns.
 	 */
 	id = srcu_read_lock(&srcu);
@@ -302,7 +302,7 @@ void mmu_notifier_unregister(struct mmu_notifier *mn, struct mm_struct *mm)
 
 	if (!hlist_unhashed(&mn->hlist)) {
 		/*
-		 * RCU here will force exit_mmap to wait ->release to finish
+		 * SRCU here will force exit_mmap to wait ->release to finish
 		 * before freeing the pages.
 		 */
 		int id;

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-05 11:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05 11:12 [PATCH] srcu mmu_notifier cleanup Andrea Arcangeli
2012-09-05 11:12 ` [PATCH] mm: mmu_notifier: make the mmu_notifier srcu static Andrea Arcangeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).