[3.19.y-ckt stable] Patch "vmscan: fix increasing nr_isolated incurred by putback unevictable pages" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Mon Oct 19 22:40:06 UTC 2015


This is a note to let you know that I have just added a patch titled

    vmscan: fix increasing nr_isolated incurred by putback unevictable pages

to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue

This patch is scheduled to be released in version 3.19.8-ckt8.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From e9dc93249c1f670e7a5f68cf32c43dc74ecb8232 Mon Sep 17 00:00:00 2001
From: Jaewon Kim <jaewon31.kim at samsung.com>
Date: Tue, 8 Sep 2015 15:02:21 -0700
Subject: vmscan: fix increasing nr_isolated incurred by putback unevictable
 pages

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 <jaewon31.kim at samsung.com>
Acked-by: Minchan Kim <minchan at kernel.org>
Cc: Mel Gorman <mgorman at techsingularity.net>
Acked-by: Vlastimil Babka <vbabka at suse.cz>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 566cc3d0..838b49a 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1112,7 +1112,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:
--
1.9.1





More information about the kernel-team mailing list