diff options
author | Jaewon Kim <jaewon31.kim@samsung.com> | 2015-09-08 15:02:21 -0700 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-10-07 10:18:57 -0400 |
commit | e6064491f59189315db9324e685ad885806b69a0 (patch) | |
tree | 83f4ed8597ec0a4a5cbe8d2ea0acd7fedfeed31d /mm/vmscan.c | |
parent | c9cfe46029a6c6f1ea337b8fe7ff98a544e9a9ec (diff) | |
download | lwn-e6064491f59189315db9324e685ad885806b69a0.tar.gz lwn-e6064491f59189315db9324e685ad885806b69a0.zip |
vmscan: fix increasing nr_isolated incurred by putback unevictable pages
[ Upstream commit c54839a722a02818677bcabe57e957f0ce4f841d ]
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 <jaewon31.kim@samsung.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index e321fe20b979..d48b28219edf 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1111,7 +1111,7 @@ cull_mlocked: if (PageSwapCache(page)) try_to_free_swap(page); unlock_page(page); - putback_lru_page(page); + list_add(&page->lru, &ret_pages); continue; activate_locked: |