diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 58d5361706f1..1d8e455e0266 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3793,7 +3793,8 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order, * their order will become available due to high fragmentation so * always increment the no progress counter for them */ - if (did_some_progress && order <= PAGE_ALLOC_COSTLY_ORDER) + if ((did_some_progress && order <= PAGE_ALLOC_COSTLY_ORDER) || + IS_ENABLED(CONFIG_HAVE_LOW_MEMORY_KILLER)) *no_progress_loops = 0; else (*no_progress_loops)++; @@ -4095,7 +4096,8 @@ retry: * implementation of the compaction depends on the sufficient amount * of free memory (see __compaction_suitable) */ - if (did_some_progress > 0 && + if ((did_some_progress > 0 || + IS_ENABLED(CONFIG_HAVE_LOW_MEMORY_KILLER)) && should_compact_retry(ac, order, alloc_flags, compact_result, &compact_priority, &compaction_retries))