https://github.com/torvalds/linux
Revision eee2acbae95555006307395d8a6c91452d62851d authored by Peter Zijlstra on 17 June 2011, 11:54:23 UTC, committed by Linus Torvalds on 18 June 2011, 02:23:52 UTC
This matches the anon_vma_clone() case, and uses the same lock helper
functions.  Because of the need to potentially release the anon_vma's,
it's a bit more complex, though.

We traverse the 'vma->anon_vma_chain' in two phases: the first loop gets
the anon_vma lock (with the helper function that only takes the lock
once for the whole loop), and removes any entries that don't need any
more processing.

The second phase just traverses the remaining list entries (without
holding the anon_vma lock), and does any actual freeing of the
anon_vma's that is required.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Tested-by: Hugh Dickins <hughd@google.com>
Tested-by: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent bb4aa39
History
Tip revision: eee2acbae95555006307395d8a6c91452d62851d authored by Peter Zijlstra on 17 June 2011, 11:54:23 UTC
mm: avoid repeated anon_vma lock/unlock sequences in unlink_anon_vmas()
Tip revision: eee2acb
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 966 bytes
.mailmap -rw-r--r-- 4.2 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 92.3 KB
Kbuild -rw-r--r-- 2.4 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 189.9 KB
Makefile -rw-r--r-- 52.2 KB
README -rw-r--r-- 17.1 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top