[PATCH] mmotm:memcgvmscan-do-not-break-out-targeted-reclaim-without-reclaimed-pages.patchfix

From: Ying Han
Date: Tue Jan 29 2013 - 03:42:28 EST


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@xxxxxxxxxx>
---
mm/vmscan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index d75c1ec..7528eae 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1985,7 +1985,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;
}
--
1.7.10.4

--
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/