Revision 6f5e6b9e69bf043074a0edabe3d271899c34eb79 authored by Hugh Dickins on 17 March 2006, 07:04:09 UTC, committed by Linus Torvalds on 17 March 2006, 15:51:26 UTC
Lee Revell reported 28ms latency when process with lots of swapped memory
exits.

2.6.15 introduced a latency regression when unmapping: in accounting the
zap_work latency breaker, pte_none counted 1, pte_present PAGE_SIZE, but a
swap entry counted nothing at all.  We think of pages present as the slow
case, but Lee's trace shows that free_swap_and_cache's radix tree lookup
can make a lot of work - and we could have been doing it many thousands of
times without a latency break.

Move the zap_work update up to account swap entries like pages present.
This does account non-linear pte_file entries, and unmap_mapping_range
skipping over swap entries, by the same amount even though they're quick:
but neither of those cases deserves complicating the code (and they're
treated no worse than they were in 2.6.14).

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 7670f02
History
File Mode Size
9p
adfs
affs
afs
autofs
autofs4
befs
bfs
cifs
coda
configfs
cramfs
debugfs
devfs
devpts
efs
exportfs
ext2
ext3
fat
freevxfs
fuse
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
isofs
jbd
jffs
jffs2
jfs
lockd
minix
msdos
ncpfs
nfs
nfs_common
nfsd
nls
ntfs
ocfs2
openpromfs
partitions
proc
qnx4
ramfs
reiserfs
relayfs
romfs
smbfs
sysfs
sysv
udf
ufs
vfat
xfs
Kconfig -rw-r--r-- 66.2 KB
Kconfig.binfmt -rw-r--r-- 5.3 KB
Makefile -rw-r--r-- 3.3 KB
aio.c -rw-r--r-- 43.9 KB
attr.c -rw-r--r-- 4.2 KB
bad_inode.c -rw-r--r-- 2.8 KB
binfmt_aout.c -rw-r--r-- 14.8 KB
binfmt_elf.c -rw-r--r-- 45.6 KB
binfmt_elf_fdpic.c -rw-r--r-- 30.0 KB
binfmt_em86.c -rw-r--r-- 2.8 KB
binfmt_flat.c -rw-r--r-- 25.8 KB
binfmt_misc.c -rw-r--r-- 15.7 KB
binfmt_script.c -rw-r--r-- 2.7 KB
binfmt_som.c -rw-r--r-- 7.6 KB
bio.c -rw-r--r-- 30.0 KB
block_dev.c -rw-r--r-- 21.7 KB
buffer.c -rw-r--r-- 84.1 KB
char_dev.c -rw-r--r-- 10.1 KB
compat.c -rw-r--r-- 52.1 KB
compat_ioctl.c -rw-r--r-- 83.6 KB
dcache.c -rw-r--r-- 44.2 KB
dcookies.c -rw-r--r-- 6.3 KB
direct-io.c -rw-r--r-- 34.8 KB
dnotify.c -rw-r--r-- 4.3 KB
dquot.c -rw-r--r-- 51.4 KB
drop_caches.c -rw-r--r-- 1.4 KB
eventpoll.c -rw-r--r-- 44.1 KB
exec.c -rw-r--r-- 34.6 KB
fcntl.c -rw-r--r-- 13.7 KB
fifo.c -rw-r--r-- 3.2 KB
file.c -rw-r--r-- 8.7 KB
file_table.c -rw-r--r-- 6.7 KB
filesystems.c -rw-r--r-- 5.2 KB
fs-writeback.c -rw-r--r-- 19.8 KB
inode.c -rw-r--r-- 36.4 KB
inotify.c -rw-r--r-- 26.7 KB
ioctl.c -rw-r--r-- 3.9 KB
ioprio.c -rw-r--r-- 3.6 KB
libfs.c -rw-r--r-- 15.3 KB
locks.c -rw-r--r-- 55.1 KB
mbcache.c -rw-r--r-- 18.2 KB
mpage.c -rw-r--r-- 20.6 KB
namei.c -rw-r--r-- 66.1 KB
namespace.c -rw-r--r-- 44.4 KB
nfsctl.c -rw-r--r-- 2.4 KB
open.c -rw-r--r-- 26.8 KB
pipe.c -rw-r--r-- 18.5 KB
pnode.c -rw-r--r-- 7.7 KB
pnode.h -rw-r--r-- 1013 bytes
posix_acl.c -rw-r--r-- 8.5 KB
quota.c -rw-r--r-- 8.9 KB
quota_v1.c -rw-r--r-- 5.7 KB
quota_v2.c -rw-r--r-- 20.1 KB
read_write.c -rw-r--r-- 16.2 KB
readdir.c -rw-r--r-- 6.7 KB
select.c -rw-r--r-- 18.9 KB
seq_file.c -rw-r--r-- 9.6 KB
stat.c -rw-r--r-- 10.5 KB
super.c -rw-r--r-- 20.0 KB
xattr.c -rw-r--r-- 13.1 KB
xattr_acl.c -rw-r--r-- 2.3 KB

back to top