kernel-ark/mm
Hugh Dickins 6f5e6b9e69 [PATCH] fix free swap cache latency
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>
2006-03-17 07:51:26 -08:00
..
bootmem.c
fadvise.c
filemap_xip.c
filemap.c
filemap.h
fremap.c
highmem.c
hugetlb.c
internal.h
Kconfig
madvise.c
Makefile
memory_hotplug.c [PATCH] memory hotadd: pgdat->node_present_pages fix 2006-03-09 19:47:38 -08:00
memory.c [PATCH] fix free swap cache latency 2006-03-17 07:51:26 -08:00
mempolicy.c [PATCH] page migration: Fail with error if swap not setup 2006-03-17 07:51:25 -08:00
mempool.c
mincore.c
mlock.c
mmap.c
mprotect.c
mremap.c
msync.c
nommu.c [PATCH] nommu: implement vmalloc_node() 2006-02-28 20:53:44 -08:00
oom_kill.c [PATCH] out_of_memory() locking fix 2006-03-02 08:33:07 -08:00
page_alloc.c [PATCH] slab: Node rotor for freeing alien caches and remote per cpu pages. 2006-03-09 19:47:38 -08:00
page_io.c
page-writeback.c
pdflush.c
prio_tree.c
readahead.c
rmap.c [PATCH] page_add_file_rmap(): remove BUG_ON()s 2006-03-09 19:47:36 -08:00
shmem.c
slab.c [PATCH] slab: Node rotor for freeing alien caches and remote per cpu pages. 2006-03-09 19:47:38 -08:00
slob.c
sparse.c
swap_state.c
swap.c [PATCH] fix race in pagevec_strip? 2006-03-17 07:51:25 -08:00
swapfile.c
thrash.c
tiny-shmem.c
truncate.c
util.c
vmalloc.c
vmscan.c [PATCH] page migration: fail if page is in a vma flagged VM_LOCKED 2006-03-14 21:43:02 -08:00