Re: [PATCH] mm/page_vma_mapped: guard check_pmd() with CONFIG_TRANSPARENT_HUGEPAGE

From: Lorenzo Stoakes

Date: Thu Jun 25 2026 - 10:02:28 EST


On Thu, Jun 25, 2026 at 03:49:59PM +0200, David Hildenbrand (Arm) wrote:
> On 6/25/26 15:45, Lorenzo Stoakes wrote:
> > On Wed, Jun 24, 2026 at 08:23:59AM +0000, Wei Yang wrote:
> >> The kernel test robot reported a build failure on the parisc architecture
> >> when expanding HPAGE_PMD_NR in check_pmd().
> >
> > Let me first say that I absolutely hate that we continue to support museum
> > piece architectures to the point that we have to make changes in core code
> > to accommodate them.
>
> I wonder why we shouldn't be able to trigger that on other archs with
> !CONFIG_TRANSPARENT_HUGEPAGE ?

I think this should just use CONFIG_PGTABLE_HAS_HUGE_LEAVES, since that's the
property that literally defines whether check_pmd() makes any sense.

>
> I think the code just relies on pmd_trans_huge() == false, and consequently
> check_pmd will get compiled out completely.
>
> Now, the report was against Wei's new patch.
>
> There is *nothing* to be fixed for existing code.

OK so it's a fix sent in the merge window, against a patch sent in the merge
window. Great.

I mean, let's all chill here. Sip some wine. Some brandy. Some absinthe. Perhaps
even some turpentine* for the connoisseurs!

Slow down a bit Wei!

You're sending a lot of fiddly series that require a lot of review and we're
extremely busy with review already.

Please just relax and maybe go water your garden a bit. Have a cornetto :)

>
>
> Fixes: 2aff7a4755be ("mm: Convert page_vma_mapped_walk to work on PFNs")
>
> is just wrong?

Yes therefore it is indeed.

Though it's really horrible that we relied on things getting compiled out like
that... nasty!

>
> --
> Cheers,
>
> David

Cheers, Lorenzo

*Obligatory safety notice for the overly literal: do not do this, this is a
joke.