From: Andrew Morton <akpm@linux-foundation.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-mm@kvack.org, Andi Kleen <ak@linux.intel.com>,
Andrea Arcangeli <aarcange@redhat.com>
Subject: Re: [PATCH 1/4] VM/RMAP: Add infrastructure for batching the rmap chain locking v2
Date: Wed, 18 May 2011 14:20:52 -0700 [thread overview]
Message-ID: <20110518142052.e0b6f327.akpm@linux-foundation.org> (raw)
In-Reply-To: <20110518211443.GB12317@one.firstfloor.org>
On Wed, 18 May 2011 23:14:43 +0200
Andi Kleen <andi@firstfloor.org> wrote:
> On Wed, May 18, 2011 at 01:25:47PM -0700, Andrew Morton wrote:
> > On Fri, 13 May 2011 16:46:21 -0700
> > Andi Kleen <andi@firstfloor.org> wrote:
> >
> > > In fork and exit it's quite common to take same rmap chain locks
> > > again and again when the whole address space is processed for a
> > > address space that has a lot of sharing. Also since the locking
> > > has changed to always lock the root anon_vma this can be very
> > > contended.
> > >
> > > This patch adds a simple wrapper to batch these lock acquisitions
> > > and only reaquire the lock when another is needed. The main
> > > advantage is that when multiple processes are doing this in
> > > parallel they will avoid a lot of communication overhead
> > > on the lock cache line.
> > >
> > > v2: Address review feedback. Drop lockbreak. Rename init function.
> >
> > Doesn't compile:
> >
> > include/linux/rmap.h: In function 'anon_vma_unlock_batch':
> > include/linux/rmap.h:146: error: 'struct anon_vma' has no member named 'lock'
> > mm/rmap.c: In function '__anon_vma_lock_batch':
> > mm/rmap.c:1737: error: 'struct anon_vma' has no member named 'lock'
> > mm/rmap.c:1739: error: 'struct anon_vma' has no member named 'lock'
> >
> > I think I reported this against the v1 patches.
>
> Hmm is that against -mm? Which tree exactly?
>
> Both in Linus' latest and in -next I have
>
> include/linux/rmap.h:
>
> struct anon_vma {
> struct anon_vma *root; /* Root of this anon_vma tree */
> spinlock_t lock; /* Serialize access to vma list */
>
> So it should compile. And it compiles here of course.
ah, whoop, sorry. It's getting turned into a mutex, by
mm-convert-anon_vma-lock-to-a-mutex.patch
> To be honest I forgot where the -mm tree is, so I can't check.
> It's not in its old place on kernel.org anymore?
http://userweb.kernel.org/~akpm/mmotm/
If you dive into the `series' file you'll see that this patch is part of this
series:
mm-mmu_gather-rework.patch
mm-mmu_gather-rework-fix.patch
powerpc-mmu_gather-rework.patch
sparc-mmu_gather-rework.patch
s390-mmu_gather-rework.patch
arm-mmu_gather-rework.patch
sh-mmu_gather-rework.patch
ia64-mmu_gather-rework.patch
um-mmu_gather-rework.patch
mm-now-that-all-old-mmu_gather-code-is-gone-remove-the-storage.patch
mm-powerpc-move-the-rcu-page-table-freeing-into-generic-code.patch
mm-extended-batches-for-generic-mmu_gather.patch
mm-extended-batches-for-generic-mmu_gather-fix.patch
lockdep-mutex-provide-mutex_lock_nest_lock.patch
mm-remove-i_mmap_lock-lockbreak.patch
mm-convert-i_mmap_lock-to-a-mutex.patch
mm-revert-page_lock_anon_vma-lock-annotation.patch
mm-improve-page_lock_anon_vma-comment.patch
mm-use-refcounts-for-page_lock_anon_vma.patch
mm-convert-anon_vma-lock-to-a-mutex.patch
mm-optimize-page_lock_anon_vma-fast-path.patch
mm-uninline-large-generic-tlbh-functions.patch
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-05-18 21:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 23:46 Batch locking for rmap fork/exit processing v2 Andi Kleen
2011-05-13 23:46 ` [PATCH 1/4] VM/RMAP: Add infrastructure for batching the rmap chain locking v2 Andi Kleen
2011-05-18 20:25 ` Andrew Morton
2011-05-18 21:14 ` Andi Kleen
2011-05-18 21:20 ` Andrew Morton [this message]
2011-05-18 21:35 ` Andi Kleen
2011-05-18 21:39 ` Andrew Morton
2011-05-13 23:46 ` [PATCH 2/4] VM/RMAP: Batch anon vma chain root locking in fork Andi Kleen
2011-05-13 23:46 ` [PATCH 3/4] VM/RMAP: Batch anon_vma_unlink in exit Andi Kleen
2011-05-13 23:46 ` [PATCH 4/4] VM/RMAP: Move avc freeing outside the lock Andi Kleen
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=20110518142052.e0b6f327.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=aarcange@redhat.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=linux-mm@kvack.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