The patch titled Subject: mm, compaction: restrict full priority to non-costly orders has been added to the -mm tree. Its filename is mm-compaction-restrict-full-priority-to-non-costly-orders.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-compaction-restrict-full-priority-to-non-costly-orders.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-compaction-restrict-full-priority-to-non-costly-orders.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Vlastimil Babka <vbabka@xxxxxxx> Subject: mm, compaction: restrict full priority to non-costly orders The new ultimate compaction priority disables some heuristics, which may result in excessive cost. This is fine for non-costly orders where we want to try hard before resulting for OOM, but might be disruptive for costly orders which do not trigger OOM and should generally have some fallback. Thus, we disable the full priority for costly orders. Suggested-by: Michal Hocko <mhocko@xxxxxxxxxx> Link: http://lkml.kernel.org/r/20160906135258.18335-4-vbabka@xxxxxxx Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Cc: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/compaction.h | 1 + mm/page_alloc.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff -puN include/linux/compaction.h~mm-compaction-restrict-full-priority-to-non-costly-orders include/linux/compaction.h --- a/include/linux/compaction.h~mm-compaction-restrict-full-priority-to-non-costly-orders +++ a/include/linux/compaction.h @@ -9,6 +9,7 @@ enum compact_priority { COMPACT_PRIO_SYNC_FULL, MIN_COMPACT_PRIORITY = COMPACT_PRIO_SYNC_FULL, COMPACT_PRIO_SYNC_LIGHT, + MIN_COMPACT_COSTLY_PRIORITY = COMPACT_PRIO_SYNC_LIGHT, DEF_COMPACT_PRIORITY = COMPACT_PRIO_SYNC_LIGHT, COMPACT_PRIO_ASYNC, INIT_COMPACT_PRIORITY = COMPACT_PRIO_ASYNC diff -puN mm/page_alloc.c~mm-compaction-restrict-full-priority-to-non-costly-orders mm/page_alloc.c --- a/mm/page_alloc.c~mm-compaction-restrict-full-priority-to-non-costly-orders +++ a/mm/page_alloc.c @@ -3163,6 +3163,7 @@ should_compact_retry(struct alloc_contex int compaction_retries) { int max_retries = MAX_COMPACT_RETRIES; + int min_priority; if (!order) return false; @@ -3202,7 +3203,9 @@ should_compact_retry(struct alloc_contex * if we exhausted all retries at the lower priorities */ check_priority: - if (*compact_priority > MIN_COMPACT_PRIORITY) { + min_priority = (order > PAGE_ALLOC_COSTLY_ORDER) ? + MIN_COMPACT_COSTLY_PRIORITY : MIN_COMPACT_PRIORITY; + if (*compact_priority > min_priority) { (*compact_priority)--; return true; } _ Patches currently in -mm which might be from vbabka@xxxxxxx are mm-compaction-make-whole_zone-flag-ignore-cached-scanner-positions.patch mm-compaction-cleanup-unused-functions.patch mm-compaction-rename-compact_partial-to-compact_success.patch mm-compaction-dont-recheck-watermarks-after-compact_success.patch mm-compaction-add-the-ultimate-direct-compaction-priority.patch mm-compaction-add-the-ultimate-direct-compaction-priority-fix.patch mm-compaction-use-correct-watermark-when-checking-compaction-success.patch mm-compaction-create-compact_gap-wrapper.patch mm-compaction-create-compact_gap-wrapper-fix.patch mm-compaction-use-proper-alloc_flags-in-__compaction_suitable.patch mm-compaction-require-only-min-watermarks-for-non-costly-orders.patch mm-compaction-require-only-min-watermarks-for-non-costly-orders-fix.patch mm-vmscan-make-compaction_ready-more-accurate-and-readable.patch revert-mm-oom-prevent-premature-oom-killer-invocation-for-high-order-request.patch mm-compaction-more-reliably-increase-direct-compaction-priority.patch mm-compaction-restrict-full-priority-to-non-costly-orders.patch mm-compaction-make-full-priority-ignore-pageblock-suitability.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html