|
@@ -1928,6 +1928,17 @@ this_zone_full:
|
|
zlc_active = 0;
|
|
zlc_active = 0;
|
|
goto zonelist_scan;
|
|
goto zonelist_scan;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (page)
|
|
|
|
+ /*
|
|
|
|
+ * page->pfmemalloc is set when ALLOC_NO_WATERMARKS was
|
|
|
|
+ * necessary to allocate the page. The expectation is
|
|
|
|
+ * that the caller is taking steps that will free more
|
|
|
|
+ * memory. The caller should avoid the page being used
|
|
|
|
+ * for !PFMEMALLOC purposes.
|
|
|
|
+ */
|
|
|
|
+ page->pfmemalloc = !!(alloc_flags & ALLOC_NO_WATERMARKS);
|
|
|
|
+
|
|
return page;
|
|
return page;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2389,14 +2400,6 @@ rebalance:
|
|
zonelist, high_zoneidx, nodemask,
|
|
zonelist, high_zoneidx, nodemask,
|
|
preferred_zone, migratetype);
|
|
preferred_zone, migratetype);
|
|
if (page) {
|
|
if (page) {
|
|
- /*
|
|
|
|
- * page->pfmemalloc is set when ALLOC_NO_WATERMARKS was
|
|
|
|
- * necessary to allocate the page. The expectation is
|
|
|
|
- * that the caller is taking steps that will free more
|
|
|
|
- * memory. The caller should avoid the page being used
|
|
|
|
- * for !PFMEMALLOC purposes.
|
|
|
|
- */
|
|
|
|
- page->pfmemalloc = true;
|
|
|
|
goto got_pg;
|
|
goto got_pg;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2569,8 +2572,6 @@ retry_cpuset:
|
|
page = __alloc_pages_slowpath(gfp_mask, order,
|
|
page = __alloc_pages_slowpath(gfp_mask, order,
|
|
zonelist, high_zoneidx, nodemask,
|
|
zonelist, high_zoneidx, nodemask,
|
|
preferred_zone, migratetype);
|
|
preferred_zone, migratetype);
|
|
- else
|
|
|
|
- page->pfmemalloc = false;
|
|
|
|
|
|
|
|
trace_mm_page_alloc(page, order, gfp_mask, migratetype);
|
|
trace_mm_page_alloc(page, order, gfp_mask, migratetype);
|
|
|
|
|