Re: [PATCH mm-hotfixes v2 2/2] mm/huge_memory: separate out CONFIG_PERSISTENT_HUGE_ZERO_FOLIO logic

"Lorenzo Stoakes (ARM)" <[email protected]>
Newsgroups org.kvack.linux-mm,org.kernel.vger.linux-kernel
Message-ID <anw-dxYi-OXFjE9r@lucifer>
On Wed, Aug 12, 2026 at 10:05:55AM +0200, David Hildenbrand (Arm) wrote:
> 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: <[email protected]>

Yeah these tags weren't part of it + it was intended as a separate thing but I
guess it got lost in translation.

I should probably have just sent it entirely separately after the fix landed so
my bad on that part.

>
> 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.

Sorry about that :) At least it's not schlop? ;))

>
> --
> Cheers,
>
> David

--
Cheers, Lorenzo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.