[lkml]   [2015]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 3.16.y-ckt 079/133] vmscan: fix increasing nr_isolated incurred by putback unevictable pages
3.16.7-ckt18 -stable review patch.  If anyone has any objections, please let me know.


From: Jaewon Kim <>

commit c54839a722a02818677bcabe57e957f0ce4f841d upstream.

reclaim_clean_pages_from_list() assumes that shrink_page_list() returns
number of pages removed from the candidate list. But shrink_page_list()
puts back mlocked pages without passing it to caller and without
counting as nr_reclaimed. This increases nr_isolated.

To fix this, this patch changes shrink_page_list() to pass unevictable
pages back to caller. Caller will take care those pages.

Minchan said:

It fixes two issues.

1. With unevictable page, cma_alloc will be successful.

Exactly speaking, cma_alloc of current kernel will fail due to
unevictable pages.

2. fix leaking of NR_ISOLATED counter of vmstat

With it, too_many_isolated works. Otherwise, it could make hang until
the process get SIGKILL.

Signed-off-by: Jaewon Kim <>
Acked-by: Minchan Kim <>
Cc: Mel Gorman <>
Acked-by: Vlastimil Babka <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
Signed-off-by: Luis Henriques <>
mm/vmscan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index d75349d574a3..c9091e10a18d 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1106,7 +1106,7 @@ cull_mlocked:
if (PageSwapCache(page))
- putback_lru_page(page);
+ list_add(&page->lru, &ret_pages);


 \ /
  Last update: 2015-09-30 12:41    [W:0.350 / U:3.048 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site