Re: [PATCH 1/4] mm/compaction: stop recording free page order in page->private

From: Lance Yang

Date: Wed Jul 01 2026 - 02:50:13 EST



On Sun, Jun 28, 2026 at 10:56:19PM -0400, Zi Yan wrote:
>Commit 733aea0b3a7bb ("mm/compaction: add support for >0 order folio
>memory compaction.") stores isolated free pages in an array indexed by free
>page orders, it is no longer needed to store the order in each page's
>->private field. And there is no code using the stored order. Stop doing
>that.
>
>It also prepares for an upcoming change that ensures subpage->private is
>zero at page free time and the removal of set_page_private(0) from
>prep_compound_tail(). In alloc_contig_frozen_range_noprof(),
>isolate_freepages_range() is used to grab free pages from buddy allocator
>and it leaves the aforementioned page->private set until
>either split_free_frozen_pages() or prep_new_page() is called. That
>triggers the upcoming subpage->private nonzero check along once
>set_page_private(0) is removed from prep_compound_tail(), which is called
>via prep_new_page().
>
>Signed-off-by: Zi Yan <ziy@xxxxxxxxxx>
>---

IIUC, after isolation, the order is tracked by the per-order freelist :)
LGTM, feel free to add:

Reviewed-by: Lance Yang <lance.yang@xxxxxxxxx>