From 18c59d58baa60a8bfaec58d29b6b94877664eed8 Mon Sep 17 00:00:00 2001 From: Kemeng Shi Date: Fri, 4 Aug 2023 19:04:54 +0800 Subject: [PATCH] mm/compaction: only set skip flag if cc->no_set_skip_hint is false Keep the same logic as update_pageblock_skip, only set skip if no_set_skip_hint is false which is more reasonable. Link: https://lkml.kernel.org/r/20230804110454.2935878-9-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi Reviewed-by: David Hildenbrand Cc: Baolin Wang Cc: Mel Gorman Signed-off-by: Andrew Morton --- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/compaction.c b/mm/compaction.c index 91a9dfa41ef47..fe7b4e7c5d240 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1442,7 +1442,7 @@ fast_isolate_around(struct compact_control *cc, unsigned long pfn) isolate_freepages_block(cc, &start_pfn, end_pfn, &cc->freepages, 1, false); /* Skip this pageblock in the future as it's full or nearly full */ - if (start_pfn == end_pfn) + if (start_pfn == end_pfn && !cc->no_set_skip_hint) set_pageblock_skip(page); } -- 2.30.2