aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/page_alloc.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 7350986bbf99..b54c5cbf0200 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1942,9 +1942,24 @@ zonelist_scan:
1942 continue; 1942 continue;
1943 default: 1943 default:
1944 /* did we reclaim enough */ 1944 /* did we reclaim enough */
1945 if (!zone_watermark_ok(zone, order, mark, 1945 if (zone_watermark_ok(zone, order, mark,
1946 classzone_idx, alloc_flags)) 1946 classzone_idx, alloc_flags))
1947 goto try_this_zone;
1948
1949 /*
1950 * Failed to reclaim enough to meet watermark.
1951 * Only mark the zone full if checking the min
1952 * watermark or if we failed to reclaim just
1953 * 1<<order pages or else the page allocator
1954 * fastpath will prematurely mark zones full
1955 * when the watermark is between the low and
1956 * min watermarks.
1957 */
1958 if (((alloc_flags & ALLOC_WMARK_MASK) == ALLOC_WMARK_MIN) ||
1959 ret == ZONE_RECLAIM_SOME)
1947 goto this_zone_full; 1960 goto this_zone_full;
1961
1962 continue;
1948 } 1963 }
1949 } 1964 }
1950 1965