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

From: Zi Yan

Date: Mon Jun 29 2026 - 21:38:04 EST


On Mon Jun 29, 2026 at 9:32 PM EDT, Baolin Wang wrote:
>
>
> On 6/29/26 10:56 AM, 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
>
> I noticed that people tend to avoid using the term "subpage" now, though
> I understand what you mean by it here. :)
>
> [1] https://lore.kernel.org/all/20260623125723.2503832-1-dev.jain@xxxxxxx/

Thanks. I was confused which to use subpage or tail page. Now I know
tail page is the way to go.

>
>> 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>
>> ---
>
> LGTM.
> Reviewed-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>

Thanks.

--
Best Regards,
Yan, Zi