Commit de2e7567 authored by Minchan Kim's avatar Minchan Kim Committed by Linus Torvalds

vmscan: don't attempt to reclaim anon page in lumpy reclaim when no swap space is available

The VM already avoids attempting to reclaim anon pages in various places,
But it doesn't avoid it for lumpy reclaim.

It shuffles lru list unnecessary so that it is pointless.

[ cleanup]
Signed-off-by: default avatarMinchan Kim <>
Reviewed-by: default avatarKOSAKI Motohiro <>
Reviewed-by: default avatarRik van Riel <>
Cc: Mel Gorman <>
Cc: KAMEZAWA Hiroyuki <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent adea02a1
......@@ -935,6 +935,16 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
/* Check that we have not crossed a zone boundary. */
if (unlikely(page_zone_id(cursor_page) != zone_id))
* If we don't have enough swap space, reclaiming of
* anon page which don't already have a swap slot is
* pointless.
if (nr_swap_pages <= 0 && PageAnon(cursor_page) &&
if (__isolate_lru_page(cursor_page, mode, file) == 0) {
list_move(&cursor_page->lru, dst);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment