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-- 21.0 KB
Makefile -rw-r--r-- 1.8 KB
nls_ascii.c -rw-r--r-- 5.7 KB
nls_base.c -rw-r--r-- 15.1 KB
nls_cp1250.c -rw-r--r-- 15.1 KB
nls_cp1251.c -rw-r--r-- 12.5 KB
nls_cp1255.c -rw-r--r-- 17.0 KB
nls_cp437.c -rw-r--r-- 17.1 KB
nls_cp737.c -rw-r--r-- 15.2 KB
nls_cp775.c -rw-r--r-- 13.3 KB
nls_cp850.c -rw-r--r-- 13.1 KB
nls_cp852.c -rw-r--r-- 14.5 KB
nls_cp855.c -rw-r--r-- 12.1 KB
nls_cp857.c -rw-r--r-- 12.4 KB
nls_cp860.c -rw-r--r-- 15.8 KB
nls_cp861.c -rw-r--r-- 17.1 KB
nls_cp862.c -rw-r--r-- 19.0 KB
nls_cp863.c -rw-r--r-- 16.8 KB
nls_cp864.c -rw-r--r-- 18.6 KB
nls_cp865.c -rw-r--r-- 17.1 KB
nls_cp866.c -rw-r--r-- 12.4 KB
nls_cp869.c -rw-r--r-- 13.1 KB
nls_cp874.c -rw-r--r-- 10.7 KB
nls_cp932.c -rw-r--r-- 479.7 KB
nls_cp936.c -rw-r--r-- 682.0 KB
nls_cp949.c -rw-r--r-- 854.8 KB
nls_cp950.c -rw-r--r-- 580.0 KB
nls_euc-jp.c -rw-r--r-- 23.9 KB
nls_iso8859-1.c -rw-r--r-- 10.0 KB
nls_iso8859-13.c -rw-r--r-- 11.5 KB
nls_iso8859-14.c -rw-r--r-- 14.5 KB
nls_iso8859-15.c -rw-r--r-- 12.6 KB
nls_iso8859-2.c -rw-r--r-- 12.9 KB
nls_iso8859-3.c -rw-r--r-- 12.9 KB
nls_iso8859-4.c -rw-r--r-- 12.9 KB
nls_iso8859-5.c -rw-r--r-- 10.7 KB
nls_iso8859-6.c -rw-r--r-- 10.2 KB
nls_iso8859-7.c -rw-r--r-- 13.2 KB
nls_iso8859-9.c -rw-r--r-- 10.8 KB
nls_koi8-r.c -rw-r--r-- 13.5 KB
nls_koi8-ru.c -rw-r--r-- 1.7 KB
nls_koi8-u.c -rw-r--r-- 13.9 KB
nls_utf8.c -rw-r--r-- 1.2 KB

back to top