diff mbox series

[v2,8/8] mm/compaction: only set skip flag if cc->no_set_skip_hint is false

Message ID 20230802093741.2333325-9-shikemeng@huaweicloud.com (mailing list archive)
State New
Headers show
Series Fixes and cleanups to compaction | expand

Commit Message

Kemeng Shi Aug. 2, 2023, 9:37 a.m. UTC
Keep the same logic as update_pageblock_skip, only set skip if
no_set_skip_hint is false which is more reasonable.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
---
 mm/compaction.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/mm/compaction.c b/mm/compaction.c
index a1cc327d1b32..afc31d27f1ba 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1421,7 +1421,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);
 }