linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@qumranet.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Christoph Lameter <clameter@sgi.com>,
	Jack Steiner <steiner@sgi.com>, Robin Holt <holt@sgi.com>,
	Nick Piggin <npiggin@suse.de>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	kvm@vger.kernel.org, Kanoj Sarcar <kanojsarcar@yahoo.com>,
	Roland Dreier <rdreier@cisco.com>,
	Steve Wise <swise@opengridcomputing.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Avi Kivity <avi@qumranet.com>,
	linux-mm@kvack.org, general@lists.openfabrics.org,
	Hugh Dickins <hugh@veritas.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Chris Wright <chrisw@redhat.com>,
	Marcelo Tosatti <marcelo@kvack.org>,
	Eric Dumazet <dada1@cosmosbay.com>,
	"Paul E. McKenney" <paulmck@us.ibm.com>,
	Izik Eidus <izike@qumranet.com>, Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH 2 of 3] mm_take_all_locks
Date: Thu, 5 Jun 2008 18:44:21 +0200	[thread overview]
Message-ID: <20080605164421.GG15502@duo.random> (raw)
In-Reply-To: <alpine.LFD.1.10.0806050913060.3473@woody.linux-foundation.org>

On Thu, Jun 05, 2008 at 09:15:41AM -0700, Linus Torvalds wrote:
> 
> Just a small comment fix.
> 
> On Thu, 5 Jun 2008, Andrea Arcangeli wrote:
> > +		/*
> > +		 * AS_MM_ALL_LOCKS can't change from under us because
> > +		 * we hold the global_mm_spinlock.
> 
> There's no global_mm_spinlock, you mean the 'mm_all_locks_mutex'.
> 
> (There was at least one other case where you had that comment issue).

From: Andrea Arcangeli <andrea@qumranet.com>

Indeed, I meant mm_all_locks_mutex, this will fix it, or if you prefer
a resubmit of the 2/3 let me know. Thanks!

Signed-off-by: Andrea Arcangeli <andrea@qumranet.com>
---

diff -r 082f312bc682 mm/mmap.c
--- a/mm/mmap.c	Thu Jun 05 17:30:17 2008 +0200
+++ b/mm/mmap.c	Thu Jun 05 18:40:23 2008 +0200
@@ -2263,7 +2263,7 @@ static void vm_lock_anon_vma(struct anon
 	if (!test_bit(0, (unsigned long *) &anon_vma->head.next)) {
 		/*
 		 * The LSB of head.next can't change from under us
-		 * because we hold the global_mm_spinlock.
+		 * because we hold the mm_all_locks_mutex.
 		 */
 		spin_lock(&anon_vma->lock);
 		/*
@@ -2286,11 +2286,11 @@ static void vm_lock_mapping(struct addre
 	if (!test_bit(AS_MM_ALL_LOCKS, &mapping->flags)) {
 		/*
 		 * AS_MM_ALL_LOCKS can't change from under us because
-		 * we hold the global_mm_spinlock.
+		 * we hold the mm_all_locks_mutex.
 		 *
 		 * Operations on ->flags have to be atomic because
 		 * even if AS_MM_ALL_LOCKS is stable thanks to the
-		 * global_mm_spinlock, there may be other cpus
+		 * mm_all_locks_mutex, there may be other cpus
 		 * changing other bitflags in parallel to us.
 		 */
 		if (test_and_set_bit(AS_MM_ALL_LOCKS, &mapping->flags))
@@ -2362,7 +2362,7 @@ static void vm_unlock_anon_vma(struct an
 	if (test_bit(0, (unsigned long *) &anon_vma->head.next)) {
 		/*
 		 * The LSB of head.next can't change to 0 from under
-		 * us because we hold the global_mm_spinlock.
+		 * us because we hold the mm_all_locks_mutex.
 		 *
 		 * We must however clear the bitflag before unlocking
 		 * the vma so the users using the anon_vma->head will
@@ -2384,7 +2384,7 @@ static void vm_unlock_mapping(struct add
 	if (test_bit(AS_MM_ALL_LOCKS, &mapping->flags)) {
 		/*
 		 * AS_MM_ALL_LOCKS can't change to 0 from under us
-		 * because we hold the global_mm_spinlock.
+		 * because we hold the mm_all_locks_mutex.
 		 */
 		spin_unlock(&mapping->i_mmap_lock);
 		if (!test_and_clear_bit(AS_MM_ALL_LOCKS,

--
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>

  reply	other threads:[~2008-06-05 16:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-05 15:36 [PATCH 0 of 3] mmu notifier v18 Andrea Arcangeli
2008-06-05 15:36 ` [PATCH 1 of 3] list_del_init_rcu Andrea Arcangeli, Andrea Arcangeli
2008-06-05 15:36 ` [PATCH 2 of 3] mm_take_all_locks Andrea Arcangeli, Andrea Arcangeli
2008-06-05 16:15   ` Linus Torvalds
2008-06-05 16:44     ` Andrea Arcangeli [this message]
2008-06-05 15:36 ` [PATCH 3 of 3] mmu-notifier-core Andrea Arcangeli, Andrea Arcangeli
2008-06-26  0:26 [PATCH 0 of 3] mmu notifier v18 for -mm Andrea Arcangeli
2008-06-26  0:26 ` [PATCH 2 of 3] mm_take_all_locks Andrea Arcangeli, Andrea Arcangeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080605164421.GG15502@duo.random \
    --to=andrea@qumranet.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=aliguori@us.ibm.com \
    --cc=avi@qumranet.com \
    --cc=chrisw@redhat.com \
    --cc=clameter@sgi.com \
    --cc=dada1@cosmosbay.com \
    --cc=general@lists.openfabrics.org \
    --cc=holt@sgi.com \
    --cc=hugh@veritas.com \
    --cc=izike@qumranet.com \
    --cc=kanojsarcar@yahoo.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=marcelo@kvack.org \
    --cc=npiggin@suse.de \
    --cc=paulmck@us.ibm.com \
    --cc=rdreier@cisco.com \
    --cc=riel@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --cc=steiner@sgi.com \
    --cc=swise@opengridcomputing.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox