aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/vmscan.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 292f50a2a685..463990941a78 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1973,18 +1973,17 @@ static void shrink_zone(struct zone *zone, struct scan_control *sc)
1973 shrink_lruvec(lruvec, sc); 1973 shrink_lruvec(lruvec, sc);
1974 1974
1975 /* 1975 /*
1976 * Limit reclaim has historically picked one 1976 * Direct reclaim and kswapd have to scan all memory
1977 * memcg and scanned it with decreasing 1977 * cgroups to fulfill the overall scan target for the
1978 * priority levels until nr_to_reclaim had
1979 * been reclaimed. This priority cycle is
1980 * thus over after a single memcg.
1981 *
1982 * Direct reclaim and kswapd, on the other
1983 * hand, have to scan all memory cgroups to
1984 * fulfill the overall scan target for the
1985 * zone. 1978 * zone.
1979 *
1980 * Limit reclaim, on the other hand, only cares about
1981 * nr_to_reclaim pages to be reclaimed and it will
1982 * retry with decreasing priority if one round over the
1983 * whole hierarchy is not sufficient.
1986 */ 1984 */
1987 if (!global_reclaim(sc)) { 1985 if (!global_reclaim(sc) &&
1986 sc->nr_reclaimed >= sc->nr_to_reclaim) {
1988 mem_cgroup_iter_break(root, memcg); 1987 mem_cgroup_iter_break(root, memcg);
1989 break; 1988 break;
1990 } 1989 }