From: Vlastimil Babka Date: Sat, 10 Sep 2016 10:34:05 +0000 (+1000) Subject: mm-compaction-add-the-ultimate-direct-compaction-priority-fix X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=37cb68cf2d5dbf42f26879852c2773a8b962d525;p=deliverable%2Flinux.git mm-compaction-add-the-ultimate-direct-compaction-priority-fix Use the MIN_COMPACT_PRIORITY alias instead of COMPACT_PRIO_SYNC_FULL to disable heuristics "because this would be easier to follow and it would be easier for future changes", per Michal. Link: http://lkml.kernel.org/r/d443b884-87e7-1c93-8684-3a3a35759fb1@suse.cz Signed-off-by: Vlastimil Babka Suggested-by: Michal Hocko Acked-by: Michal Hocko Signed-off-by: Andrew Morton --- diff --git a/mm/compaction.c b/mm/compaction.c index 342fa9e3127a..21040304f4d2 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1644,8 +1644,8 @@ static enum compact_result compact_zone_order(struct zone *zone, int order, .alloc_flags = alloc_flags, .classzone_idx = classzone_idx, .direct_compaction = true, - .whole_zone = (prio == COMPACT_PRIO_SYNC_FULL), - .ignore_skip_hint = (prio == COMPACT_PRIO_SYNC_FULL) + .whole_zone = (prio == MIN_COMPACT_PRIORITY), + .ignore_skip_hint = (prio == MIN_COMPACT_PRIORITY) }; INIT_LIST_HEAD(&cc.freepages); INIT_LIST_HEAD(&cc.migratepages); @@ -1691,7 +1691,7 @@ enum compact_result try_to_compact_pages(gfp_t gfp_mask, unsigned int order, ac->nodemask) { enum compact_result status; - if (prio > COMPACT_PRIO_SYNC_FULL + if (prio > MIN_COMPACT_PRIORITY && compaction_deferred(zone, order)) { rc = max_t(enum compact_result, COMPACT_DEFERRED, rc); continue;