kernel-ark/mm
Lee Schermerhorn c340010e4b [PATCH] shrink_list(): skip anon pages if not may_swap
Martin Hicks' page cache reclaim patch added the 'may_swap' flag to the
scan_control struct; and modified shrink_list() not to add anon pages to
the swap cache if may_swap is not asserted.

Ref:  http://marc.theaimsgroup.com/?l=linux-mm&m=111461480725322&w=4

However, further down, if the page is mapped, shrink_list() calls
try_to_unmap() which will call try_to_unmap_one() via try_to_unmap_anon ().
 try_to_unmap_one() will BUG_ON() an anon page that is NOT in the swap
cache.  Martin says he never encountered this path in his testing, but
agrees that it might happen.

This patch modifies shrink_list() to skip anon pages that are not already
in the swap cache when !may_swap, rather than just not adding them to the
cache.

Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-29 21:40:36 -07:00
..
bootmem.c
fadvise.c
filemap_xip.c
filemap.c [PATCH] gfp_t: mm/* (easy parts) 2005-10-28 08:16:47 -07:00
filemap.h
fremap.c
highmem.c [PATCH] gfp_t: the rest 2005-10-28 08:16:51 -07:00
hugetlb.c
internal.h
Kconfig
madvise.c
Makefile
memory.c
mempolicy.c [PATCH] Remove near all BUGs in mm/mempolicy.c 2005-10-29 21:40:35 -07:00
mempool.c [PATCH] gfp_t: mm/* (easy parts) 2005-10-28 08:16:47 -07:00
mincore.c
mlock.c
mmap.c
mprotect.c
mremap.c
msync.c [PATCH] mm/msync.c cleanup 2005-10-29 21:40:36 -07:00
nommu.c
oom_kill.c
page_alloc.c [PATCH] mm: set per-cpu-pages lower threshold to zero 2005-10-29 21:40:35 -07:00
page_io.c
page-writeback.c
pdflush.c
prio_tree.c
readahead.c
rmap.c [PATCH] swaptoken tuning 2005-10-29 21:40:35 -07:00
shmem.c [PATCH] gfp_t: mm/* (easy parts) 2005-10-28 08:16:47 -07:00
slab.c [PATCH] gfp_t: mm/* (easy parts) 2005-10-28 08:16:47 -07:00
sparse.c
swap_state.c
swap.c
swapfile.c
thrash.c [PATCH] swaptoken tuning 2005-10-29 21:40:35 -07:00
tiny-shmem.c
truncate.c
vmalloc.c [PATCH] vmalloc_node 2005-10-29 21:40:35 -07:00
vmscan.c [PATCH] shrink_list(): skip anon pages if not may_swap 2005-10-29 21:40:36 -07:00