mm/compaction: merge end_pfn boundary check in isolate_freepages_range
authorKemeng Shi <shikemeng@huawei.com>
Thu, 3 Aug 2023 09:48:59 +0000 (17:48 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 21 Aug 2023 20:37:39 +0000 (13:37 -0700)
commita2864a67452ec6e378e57cbe151aad62ccdcc03f
treee5bb4b7951679cf9e9f9654090036dbf17a2d58a
parent16951789008dc0029b1e073fb1c20c1abb4c6504
mm/compaction: merge end_pfn boundary check in isolate_freepages_range

Merge the end_pfn boundary check for single page block forward and
multiple page blocks forward to avoid do twice boundary check for multiple
page blocks forward.

Link: https://lkml.kernel.org/r/20230803094901.2915942-3-shikemeng@huaweicloud.com
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/compaction.c