|
@@ -1644,6 +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 == MIN_COMPACT_PRIORITY),
|
|
|
+ .ignore_skip_hint = (prio == MIN_COMPACT_PRIORITY)
|
|
|
};
|
|
|
INIT_LIST_HEAD(&cc.freepages);
|
|
|
INIT_LIST_HEAD(&cc.migratepages);
|
|
@@ -1689,7 +1691,8 @@ enum compact_result try_to_compact_pages(gfp_t gfp_mask, unsigned int order,
|
|
|
ac->nodemask) {
|
|
|
enum compact_result status;
|
|
|
|
|
|
- if (compaction_deferred(zone, order)) {
|
|
|
+ if (prio > MIN_COMPACT_PRIORITY
|
|
|
+ && compaction_deferred(zone, order)) {
|
|
|
rc = max_t(enum compact_result, COMPACT_DEFERRED, rc);
|
|
|
continue;
|
|
|
}
|