mm/compaction: remove repeat compact_blockskip_flush check in reset_isolation_suitable
authorKemeng Shi <shikemeng@huaweicloud.com>
Fri, 1 Sep 2023 15:51:39 +0000 (23:51 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Oct 2023 17:32:19 +0000 (10:32 -0700)
We have compact_blockskip_flush check in __reset_isolation_suitable, just
remove repeat check before __reset_isolation_suitable in
compact_blockskip_flush.

Link: https://lkml.kernel.org/r/20230901155141.249860-5-shikemeng@huaweicloud.com
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
Cc: David Hildenbrand <david@redhat.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/compaction.c

index 9ecbfbc695e5f68d8a211f32032beb75b32093eb..c377d78e0f1568e78d4761aa835bd3aaa44b3f9b 100644 (file)
@@ -382,6 +382,7 @@ static void __reset_isolation_suitable(struct zone *zone)
        bool source_set = false;
        bool free_set = false;
 
+       /* Only flush if a full compaction finished recently */
        if (!zone->compact_blockskip_flush)
                return;
 
@@ -434,9 +435,7 @@ void reset_isolation_suitable(pg_data_t *pgdat)
                if (!populated_zone(zone))
                        continue;
 
-               /* Only flush if a full compaction finished recently */
-               if (zone->compact_blockskip_flush)
-                       __reset_isolation_suitable(zone);
+               __reset_isolation_suitable(zone);
        }
 }