Re: [PATCH mm-hotfixes v2 2/2] mm/huge_memory: separate out CONFIG_PERSISTENT_HUGE_ZERO_FOLIO logic
From: David Hildenbrand (Arm)
Date: Wed Aug 12 2026 - 04:18:54 EST
On 7/30/26 12:55, Lorenzo Stoakes (ARM) wrote:
> Rather than mixing the refcounted and non-refcounted
> CONFIG_PERSISTENT_HUGE_ZERO_FOLIO logic, separate the two out cleanly
> so it is clear what happens when this configuration option is set and what
> happens when it is not.
>
> Introduce HUGE_ZERO_UNSET_PFN to abstract the ~0UL assignment, only
> introduce the refcount, lock and shrinker if
> !CONFIG_PERSISTENT_HUGE_ZERO_FOLIO, abstract initialisation and teardown,
> abstract the huge zero folio allocation from refcounting.
>
> Also change a BUG_ON() to WARN_ON_ONCE() while we're at it.
>
> No functional change intended.
Ugh. Why is this patch already upsteam with
Fixes: 3b77e8c8cde5 ("mm/thp: make is_huge_zero_pmd() safe and quicker")
Cc: <stable@xxxxxxxxxxxxxxx>
It's absolutely not a fix. It's a cleanup that should have been reviewed properly.
I really wanted to review this.
Making David grumpy in the morning, good job everyone.
--
Cheers,
David