Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 249dbaea authored by Jaewon Kim's avatar Jaewon Kim Committed by Gerrit - the friendly Code Review server
Browse files

vmscan: fix increasing nr_isolated incurred by putback unevictable pages



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: default avatarJaewon Kim <jaewon31.kim@samsung.com>
Acked-by: default avatarMinchan Kim <minchan@kernel.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Git-commit: 99e564148e202d817163a10af873a81bc33d532e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git



CRs-Fixed: 885312
Signed-off-by: default avatarVinayak Menon <vinmenon@codeaurora.org>
Change-Id: Icbd26a41d49ae33a43cbeac9d59d7be939192b5a
parent 47041024
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment