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

From: Zi Yan

Date: Mon Jun 29 2026 - 11:23:05 EST


On 29 Jun 2026, at 10:28, Vlastimil Babka (SUSE) wrote:

> On 6/29/26 04:56, 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.
>
> Ah, great observation. Cool.
>
>> 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().
>
> I'm not sure it needs to be said here (or in such detail?)

Will move it to the cover letter.

>
>> Signed-off-by: Zi Yan <ziy@xxxxxxxxxx>
>
> Reviewed-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>

Thanks.


Best Regards,
Yan, Zi