https://github.com/torvalds/linux
Revision e8a03feb54ca7f1768bbdc2b491f9ef654e6d01d authored by Rik van Riel on 14 April 2010, 21:59:28 UTC, committed by Linus Torvalds on 19 April 2010, 23:28:20 UTC
The recent anon_vma fixes cause many anonymous pages to end up
in the parent process anon_vma, even when the page is exclusively
owned by the current process.

Adding exclusively owned anonymous pages to the top anon_vma
reduces rmap scanning overhead, especially in workloads with
forking servers.

This patch adds a parameter to __page_set_anon_rmap that can
be used to indicate whether or not the added page is exclusively
owned by the current process.

Pages added through page_add_new_anon_rmap are exclusively
owned by the current process, and can be added to the top
anon_vma.

Pages added through page_add_anon_rmap can be either shared
or exclusively owned, so we do the conservative thing and
add it to the oldest anon_vma.

A next step would be to add the exclusive parameter to
page_add_anon_rmap, to be used from functions where we do
know for sure whether a page is exclusively owned.

Signed-off-by: Rik van Riel <riel@redhat.com>
Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
Lightly-tested-by: Borislav Petkov <bp@alien8.de>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
[ Edited to look nicer  - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 9b030e2
History
Tip revision: e8a03feb54ca7f1768bbdc2b491f9ef654e6d01d authored by Rik van Riel on 14 April 2010, 21:59:28 UTC
rmap: add exclusively owned pages to the newest anon_vma
Tip revision: e8a03fe
File Mode Size
Kconfig -rw-r--r-- 2.1 KB
Makefile -rw-r--r-- 374 bytes
budget.c -rw-r--r-- 23.7 KB
commit.c -rw-r--r-- 18.7 KB
compress.c -rw-r--r-- 6.6 KB
debug.c -rw-r--r-- 72.1 KB
debug.h -rw-r--r-- 17.9 KB
dir.c -rw-r--r-- 33.3 KB
file.c -rw-r--r-- 44.6 KB
find.c -rw-r--r-- 29.8 KB
gc.c -rw-r--r-- 26.7 KB
io.c -rw-r--r-- 26.6 KB
ioctl.c -rw-r--r-- 5.2 KB
journal.c -rw-r--r-- 41.7 KB
key.h -rw-r--r-- 14.1 KB
log.c -rw-r--r-- 20.3 KB
lprops.c -rw-r--r-- 36.2 KB
lpt.c -rw-r--r-- 58.7 KB
lpt_commit.c -rw-r--r-- 50.4 KB
master.c -rw-r--r-- 10.4 KB
misc.h -rw-r--r-- 9.0 KB
orphan.c -rw-r--r-- 24.8 KB
recovery.c -rw-r--r-- 37.9 KB
replay.c -rw-r--r-- 28.0 KB
sb.c -rw-r--r-- 19.0 KB
scan.c -rw-r--r-- 9.4 KB
shrinker.c -rw-r--r-- 9.3 KB
super.c -rw-r--r-- 58.1 KB
tnc.c -rw-r--r-- 87.0 KB
tnc_commit.c -rw-r--r-- 27.1 KB
tnc_misc.c -rw-r--r-- 12.6 KB
ubifs-media.h -rw-r--r-- 22.8 KB
ubifs.h -rw-r--r-- 59.0 KB
xattr.c -rw-r--r-- 15.5 KB

back to top