[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ab64a25a-0fd8-4e2f-81fb-7f948e0cddbc@kernel.org>
Date: Wed, 3 Dec 2025 23:09:40 +0100
From: "David Hildenbrand (Red Hat)" <david@...nel.org>
To: Luiz Capitulino <luizcap@...hat.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Cc: ryan.roberts@....com, akpm@...ux-foundation.org,
lorenzo.stoakes@...cle.com
Subject: Re: [RFC 06/10] mm: debug_vm_pgtable: use pgtable_has_pmd_leaves()
On 11/17/25 18:40, David Hildenbrand (Red Hat) wrote:
> On 06.11.25 22:28, Luiz Capitulino wrote:
>> debug_vm_pgtable calls has_transparent_hugepage() in multiple places to
>> check if PMD-sized pages are supported, use pgtable_has_pmd_leaves()
>
> Is that code even dealing with pages? Likely we really only want to
> check whether PMD leaves are supported, independent of any pages.
I recall that some arch protect certain pmd_* helpers under
CONFIG_TRANSPARENT_HUGEPAGE.
But it's certainly something to explore, to see if we can just get rid
of that without causing compile-time or runtime issues.
>
>> instead.
>>
>> Signed-off-by: Luiz Capitulino <luizcap@...hat.com>
>> ---
>> mm/debug_vm_pgtable.c | 20 ++++++++++----------
>> 1 file changed, 10 insertions(+), 10 deletions(-)
>>
>> diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c
>> index 830107b6dd08..241b36c78ac9 100644
>> --- a/mm/debug_vm_pgtable.c
>> +++ b/mm/debug_vm_pgtable.c
>> @@ -170,7 +170,7 @@ static void __init pmd_basic_tests(struct pgtable_debug_args *args, int idx)
>> unsigned long val = idx, *ptr = &val;
>> pmd_t pmd;
>>
>> - if (!has_transparent_hugepage())
>> + if (!pgtable_has_pmd_leaves())
>> return;
>
>
> All of these are currently protected by CONFIG_TRANSPARENT_HUGEPAGE, right?
IIUC, yes.
--
Cheers
David
Powered by blists - more mailing lists