aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiaohe Lin <[email protected]>2022-04-28 23:16:18 -0700
committerakpm <[email protected]>2022-04-28 23:16:18 -0700
commitcff387d6a2949a46d78a4f558938ef7b4cccd41f (patch)
tree02e756e2e534add1509fc5fbe43530b49b97067f
parent3109de308987ceae413ee015038d51e2a86c7806 (diff)
mm: compaction: make compaction_zonelist_suitable return false when COMPACT_SUCCESS
When compact_result indicates that the allocation should now succeed, i.e. compact_result = COMPACT_SUCCESS, compaction_zonelist_suitable should return false because there is no need to do compaction now. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Miaohe Lin <[email protected]> Cc: Charan Teja Kalla <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Pintu Kumar <[email protected]> Cc: Vlastimil Babka <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--mm/compaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/compaction.c b/mm/compaction.c
index 82c54d70a978..334a573485fe 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -2291,7 +2291,7 @@ bool compaction_zonelist_suitable(struct alloc_context *ac, int order,
available += zone_page_state_snapshot(zone, NR_FREE_PAGES);
compact_result = __compaction_suitable(zone, order, alloc_flags,
ac->highest_zoneidx, available);
- if (compact_result != COMPACT_SKIPPED)
+ if (compact_result == COMPACT_CONTINUE)
return true;
}