From 7086e163bf7e0d3ce1cb62c085f44f21a772d478 Mon Sep 17 00:00:00 2001 From: Ying Han Date: Wed, 20 Feb 2013 13:14:04 +1100 Subject: [PATCH] mmotm: memcgvmscan-do-not-break-out-targeted-reclaim-without-reclaimed-pages.patch fix We should break out of the hierarchy loop only if nr_reclaimed exceeded nr_to_reclaim and not vice-versa. This patch fixes the condition. Signed-off-by: Ying Han Cc: Michal Hocko Signed-off-by: Andrew Morton --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index ff869d2db8cd..15644f00343b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1983,7 +1983,7 @@ static void shrink_zone(struct zone *zone, struct scan_control *sc) * whole hierarchy is not sufficient. */ if (!global_reclaim(sc) && - sc->nr_to_reclaim >= sc->nr_reclaimed) { + sc->nr_to_reclaim <= sc->nr_reclaimed) { mem_cgroup_iter_break(root, memcg); break; } -- 2.39.5