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
File Mode Size
internal
aead.h -rw-r--r-- 2.6 KB
aes.h -rw-r--r-- 1019 bytes
algapi.h -rw-r--r-- 9.0 KB
authenc.h -rw-r--r-- 609 bytes
b128ops.h -rw-r--r-- 2.4 KB
compress.h -rw-r--r-- 4.0 KB
cryptd.h -rw-r--r-- 1.1 KB
crypto_wq.h -rw-r--r-- 122 bytes
ctr.h -rw-r--r-- 524 bytes
des.h -rw-r--r-- 403 bytes
gf128mul.h -rw-r--r-- 8.0 KB
hash.h -rw-r--r-- 8.8 KB
md5.h -rw-r--r-- 288 bytes
pcrypt.h -rw-r--r-- 1.4 KB
rng.h -rw-r--r-- 1.8 KB
scatterwalk.h -rw-r--r-- 3.4 KB
sha.h -rw-r--r-- 2.0 KB
skcipher.h -rw-r--r-- 2.7 KB
twofish.h -rw-r--r-- 613 bytes
vmac.h -rw-r--r-- 2.0 KB

back to top