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 [PATCH] mm: migration page refcounting fix 2006-01-18 19:20:17 -08:00
filemap.h
fremap.c
highmem.c
hugetlb.c [PATCH] compound page: use page[1].lru 2006-02-14 16:09:33 -08:00
internal.h
Kconfig
madvise.c [PATCH] madvise MADV_DONTFORK/MADV_DOFORK 2006-02-14 16:09:34 -08:00
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 [PATCH] move capable() to capability.h 2006-01-11 18:42:13 -08:00
mmap.c [PATCH] move capable() to capability.h 2006-01-11 18:42:13 -08:00
mprotect.c
mremap.c [PATCH] move capable() to capability.h 2006-01-11 18:42:13 -08:00
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 [PATCH] mm: dirty_exceeded speedup 2006-01-18 19:20:17 -08:00
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 [PATCH] tmpfs: fix mount mpol nodelist parsing 2006-02-21 17:10:15 -08:00
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 [PATCH] SLOB=y && SMP=y fix 2006-02-08 07:52:58 -08:00
sparse.c
swap_state.c [PATCH] Direct Migration V9: Avoid writeback / page_migrate() method 2006-02-01 08:53:17 -08:00
swap.c [PATCH] fix race in pagevec_strip? 2006-03-17 07:51:25 -08:00
swapfile.c [PATCH] Direct Migration V9: remove_from_swap() to remove swap ptes 2006-02-01 08:53:16 -08:00
thrash.c
tiny-shmem.c [PATCH] do_truncate() call fix in tiny-shmem.c 2006-01-12 09:08:49 -08:00
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