From: Hugh Dickins Date: Tue, 10 Jan 2012 23:08:33 +0000 (-0800) Subject: mm: test PageSwapBacked in lumpy reclaim X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=043bcbe5ec51e0478ef2b44acef17193e01d7f70;p=linux-beck.git mm: test PageSwapBacked in lumpy reclaim Lumpy reclaim does well to stop at a PageAnon when there's no swap, but better is to stop at any PageSwapBacked, which includes shmem/tmpfs too. Signed-off-by: Hugh Dickins Reviewed-by: KOSAKI Motohiro Reviewed-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/vmscan.c b/mm/vmscan.c index b935e6f0d695..8a4e767fb8ac 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1166,7 +1166,7 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan, * anon page which don't already have a swap slot is * pointless. */ - if (nr_swap_pages <= 0 && PageAnon(cursor_page) && + if (nr_swap_pages <= 0 && PageSwapBacked(cursor_page) && !PageSwapCache(cursor_page)) break;