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
9p
adfs
affs
afs
autofs
autofs4
befs
bfs
btrfs
cachefiles
ceph
cifs
coda
configfs
cramfs
debugfs
devpts
dlm
ecryptfs
efs
exofs
exportfs
ext2
ext3
ext4
fat
freevxfs
fscache
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
isofs
jbd
jbd2
jffs2
jfs
lockd
logfs
minix
ncpfs
nfs
nfs_common
nfsd
nilfs2
nls
notify
ntfs
ocfs2
omfs
openpromfs
partitions
proc
qnx4
quota
ramfs
reiserfs
romfs
smbfs
squashfs
sysfs
sysv
ubifs
udf
ufs
xfs
Kconfig -rw-r--r-- 5.4 KB
Kconfig.binfmt -rw-r--r-- 6.4 KB
Makefile -rw-r--r-- 4.1 KB
aio.c -rw-r--r-- 45.7 KB
anon_inodes.c -rw-r--r-- 6.4 KB
attr.c -rw-r--r-- 5.8 KB
bad_inode.c -rw-r--r-- 7.9 KB
binfmt_aout.c -rw-r--r-- 12.5 KB
binfmt_elf.c -rw-r--r-- 53.7 KB
binfmt_elf_fdpic.c -rw-r--r-- 48.9 KB
binfmt_em86.c -rw-r--r-- 2.8 KB
binfmt_flat.c -rw-r--r-- 26.6 KB
binfmt_misc.c -rw-r--r-- 15.1 KB
binfmt_script.c -rw-r--r-- 2.7 KB
binfmt_som.c -rw-r--r-- 7.4 KB
bio-integrity.c -rw-r--r-- 21.0 KB
bio.c -rw-r--r-- 39.2 KB
block_dev.c -rw-r--r-- 37.9 KB
buffer.c -rw-r--r-- 88.5 KB
char_dev.c -rw-r--r-- 13.9 KB
compat.c -rw-r--r-- 55.7 KB
compat_binfmt_elf.c -rw-r--r-- 3.5 KB
compat_ioctl.c -rw-r--r-- 49.2 KB
dcache.c -rw-r--r-- 59.6 KB
dcookies.c -rw-r--r-- 6.8 KB
direct-io.c -rw-r--r-- 33.7 KB
drop_caches.c -rw-r--r-- 1.6 KB
eventfd.c -rw-r--r-- 10.9 KB
eventpoll.c -rw-r--r-- 38.9 KB
exec.c -rw-r--r-- 45.6 KB
fcntl.c -rw-r--r-- 16.5 KB
fifo.c -rw-r--r-- 3.2 KB
file.c -rw-r--r-- 12.1 KB
file_table.c -rw-r--r-- 10.1 KB
filesystems.c -rw-r--r-- 6.3 KB
fs-writeback.c -rw-r--r-- 33.6 KB
fs_struct.c -rw-r--r-- 3.3 KB
generic_acl.c -rw-r--r-- 4.5 KB
inode.c -rw-r--r-- 42.1 KB
internal.h -rw-r--r-- 2.2 KB
ioctl.c -rw-r--r-- 15.9 KB
ioprio.c -rw-r--r-- 5.2 KB
libfs.c -rw-r--r-- 21.8 KB
locks.c -rw-r--r-- 57.7 KB
mbcache.c -rw-r--r-- 18.3 KB
mpage.c -rw-r--r-- 20.0 KB
namei.c -rw-r--r-- 70.5 KB
namespace.c -rw-r--r-- 58.0 KB
nfsctl.c -rw-r--r-- 2.4 KB
no-block.c -rw-r--r-- 663 bytes
open.c -rw-r--r-- 27.2 KB
pipe.c -rw-r--r-- 24.5 KB
pnode.c -rw-r--r-- 9.2 KB
pnode.h -rw-r--r-- 1.1 KB
posix_acl.c -rw-r--r-- 8.4 KB
read_write.c -rw-r--r-- 19.9 KB
read_write.h -rw-r--r-- 542 bytes
readdir.c -rw-r--r-- 6.9 KB
select.c -rw-r--r-- 24.2 KB
seq_file.c -rw-r--r-- 17.9 KB
signalfd.c -rw-r--r-- 7.1 KB
splice.c -rw-r--r-- 46.2 KB
stack.c -rw-r--r-- 2.7 KB
stat.c -rw-r--r-- 10.4 KB
super.c -rw-r--r-- 24.4 KB
sync.c -rw-r--r-- 12.3 KB
timerfd.c -rw-r--r-- 6.8 KB
utimes.c -rw-r--r-- 5.6 KB
xattr.c -rw-r--r-- 15.6 KB
xattr_acl.c -rw-r--r-- 2.3 KB

back to top