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
Kconfig -rw-r--r-- 18.3 KB
Makefile -rw-r--r-- 921 bytes
calibrate.c -rw-r--r-- 4.7 KB
do_mounts.c -rw-r--r-- 9.0 KB
do_mounts.h -rw-r--r-- 1.7 KB
do_mounts_devfs.c -rw-r--r-- 2.8 KB
do_mounts_initrd.c -rw-r--r-- 3.0 KB
do_mounts_md.c -rw-r--r-- 7.5 KB
do_mounts_rd.c -rw-r--r-- 10.0 KB
initramfs.c -rw-r--r-- 10.7 KB
main.c -rw-r--r-- 17.0 KB
version.c -rw-r--r-- 748 bytes

back to top