mm: page_alloc: move free pages when converting block during isolation
authorJohannes Weiner <hannes@cmpxchg.org>
Wed, 20 Mar 2024 18:02:09 +0000 (14:02 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Apr 2024 03:56:03 +0000 (20:56 -0700)
commitb54ccd3c6bacbc571f7e61797fb5ff9fe3861413
tree9b279a7eb118def60dc23e9ab47f90920d8a18f1
parente6cf9e1c4cde8a53385423ecb8ca581097f42e02
mm: page_alloc: move free pages when converting block during isolation

When claiming a block during compaction isolation, move any remaining free
pages to the correct freelists as well, instead of stranding them on the
wrong list.  Otherwise, this encourages incompatible page mixing down the
line, and thus long-term fragmentation.

Link: https://lkml.kernel.org/r/20240320180429.678181-5-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
Tested-by: "Huang, Ying" <ying.huang@intel.com>
Tested-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c