From: Ying Han Date: Wed, 20 Feb 2013 02:14:04 +0000 (+1100) Subject: mmotm: memcgvmscan-do-not-break-out-targeted-reclaim-without-reclaimed-pages.patch fix X-Git-Tag: next-20130220~1^2~576 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7086e163bf7e0d3ce1cb62c085f44f21a772d478;p=karo-tx-linux.git 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 --- 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; }