[PATCH 3/5] Revert "mm, oom: protect !costly allocations some more for !CONFIG_COMPACTION"

Paolo Pisati paolo.pisati at canonical.com
Thu Feb 23 15:54:35 UTC 2017


BugLink: http://bugs.launchpad.net/bugs/1665280

This reverts commit 3c2eabde02c9937d5841f526eab949b28fbbbec4.

Signed-off-by: Paolo Pisati <paolo.pisati at canonical.com>
---
 mm/page_alloc.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 345f8a5..0f5c3a6 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2908,24 +2908,6 @@ should_compact_retry(struct alloc_context *ac, unsigned int order, int alloc_fla
 		     enum migrate_mode *migrate_mode,
 		     int compaction_retries)
 {
-	struct zone *zone;
-	struct zoneref *z;
-
-	if (!order || order > PAGE_ALLOC_COSTLY_ORDER)
-		return false;
-
-	/*
-	 * There are setups with compaction disabled which would prefer to loop
-	 * inside the allocator rather than hit the oom killer prematurely.
-	 * Let's give them a good hope and keep retrying while the order-0
-	 * watermarks are OK.
-	 */
-	for_each_zone_zonelist_nodemask(zone, z, ac->zonelist, ac->high_zoneidx,
-					ac->nodemask) {
-		if (zone_watermark_ok(zone, 0, min_wmark_pages(zone),
-					ac->classzone_idx, alloc_flags))
-			return true;
-	}
 	return false;
 }
 #endif /* CONFIG_COMPACTION */
-- 
2.7.4





More information about the kernel-team mailing list