]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mmotm: memcgvmscan-do-not-break-out-targeted-reclaim-without-reclaimed-pages.patch fix
authorYing Han <yinghan@google.com>
Wed, 20 Feb 2013 02:14:04 +0000 (13:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:23 +0000 (16:52 +1100)
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 <yinghan@google.com>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmscan.c

index ff869d2db8cd4db62c99dc15f69104eba1a00924..15644f00343b4b419861181429a9705152f9e5a8 100644 (file)
@@ -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;
                        }