When migration scanner skips the rest of cc->order aligned block on isolation failure, it avoids making migrations that cannot help the allocation at hand to succeed, but the potential downside is not freeing pages in !MIGRATE_MOVABLE pageblocks which could otherwise prevent allocations of same migratetype from fallback to other pageblock types. Therefore let's restrict the skipping only to MIGRATE_MOVABLE allocations, which in the async direct compaction mode only scan MIGRATE_MOVABLE pageblocks. Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx> --- mm/compaction.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/compaction.c b/mm/compaction.c index ce73badad464..95b8b5ae59c5 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -720,7 +720,8 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn, if (compact_should_abort(cc)) return 0; - if (cc->direct_compaction && (cc->mode == MIGRATE_ASYNC)) { + if (cc->direct_compaction && (cc->mode == MIGRATE_ASYNC) && + cc->migratetype == MIGRATE_MOVABLE) { skip_on_failure = true; next_skip_pfn = block_end_pfn(low_pfn, cc->order); } -- 2.15.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>