Re: [PATCH 1/6] mm/page_owner: extract skip_buddy_pages() helper to unify buddy page skipping
From: Vlastimil Babka (SUSE)
Date: Thu Jun 25 2026 - 03:14:03 EST
On 6/25/26 02:20, Andrew Morton wrote:
> On Tue, 23 Jun 2026 14:52:26 +0800 Ye Liu <ye.liu@xxxxxxxxx> wrote:
>
>> Three places in page_owner.c duplicate the same pattern: check if a
>> page is PageBuddy, read its order via buddy_order_unsafe(), advance
>> the pfn past the buddy block if the order is valid, and continue.
>>
>> Consolidate them into a single inline helper skip_buddy_pages().
>> The function returns true (skip) for any buddy page and advances
>> @pfn past the block when the order is valid; returns false if the
>> page is not a buddy page and should be processed normally.
>>
>> The old init_pages_in_zone() variant used "order > 0" as an extra
>> guard before advancing pfn, but the continue was unconditional and
>> (1UL << 0) - 1 == 0, so the behaviour is identical. The comment
>> about zone->lock is preserved in the helper's kernel-doc.
>
> All looks nice, thanks.
I got a bunch of "added to mm-hotfixes-unstable branch" mails, but this
seems like cleanups and nothing urgent? Was that intended?
> A [0/N] cover letter is nice to have.
Seems like it exists, but wasn't delivered. Lore shows its message id, but
as missing.
> AI review identified a few possible pre-existing issues, if you're
> interested:
> https://sashiko.dev/#/patchset/20260623065234.31866-2-ye.liu@xxxxxxxxx
>