linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: "David Hildenbrand (Red Hat)" <david@kernel.org>,
	Sourabh Jain <sourabhjain@linux.ibm.com>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	"Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Cc: Donet Tom <donettom@linux.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: powerpc/e500: WARNING: at mm/hugetlb.c:4755 hugetlb_add_hstate
Date: Mon, 10 Nov 2025 19:31:01 +0100	[thread overview]
Message-ID: <1463bcd5-c47b-4c7f-bb13-2664e2e8226e@csgroup.eu> (raw)
In-Reply-To: <cdd23dd6-5444-4000-ac68-a72b22bf6a57@kernel.org>



Le 10/11/2025 à 12:27, David Hildenbrand (Red Hat) a écrit :
> Thanks for the review!
> 
>>
>> So I think what you want instead is:
>>
>> diff --git a/arch/powerpc/platforms/Kconfig.cputype
>> b/arch/powerpc/platforms/Kconfig.cputype
>> index 7b527d18aa5ee..1f5a1e587740c 100644
>> --- a/arch/powerpc/platforms/Kconfig.cputype
>> +++ b/arch/powerpc/platforms/Kconfig.cputype
>> @@ -276,6 +276,7 @@ config PPC_E500
>>           select FSL_EMB_PERFMON
>>           bool
>>           select ARCH_SUPPORTS_HUGETLBFS if PHYS_64BIT || PPC64
>> +       select ARCH_HAS_GIGANTIC_PAGE if ARCH_SUPPORTS_HUGETLBFS
>>           select PPC_SMP_MUXED_IPI
>>           select PPC_DOORBELL
>>           select PPC_KUEP
>>
>>
>>
>>>        select ARCH_HAS_KCOV
>>>        select ARCH_HAS_KERNEL_FPU_SUPPORT    if PPC64 && PPC_FPU
>>>        select ARCH_HAS_MEMBARRIER_CALLBACKS
>>> diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/
>>> platforms/Kconfig.cputype
>>> index 7b527d18aa5ee..4c321a8ea8965 100644
>>> --- a/arch/powerpc/platforms/Kconfig.cputype
>>> +++ b/arch/powerpc/platforms/Kconfig.cputype
>>> @@ -423,7 +423,6 @@ config PPC_64S_HASH_MMU
>>>    config PPC_RADIX_MMU
>>>        bool "Radix MMU Support"
>>>        depends on PPC_BOOK3S_64
>>> -    select ARCH_HAS_GIGANTIC_PAGE
>>
>> Should remain I think.
>>
>>>        default y
>>>        help
>>>          Enable support for the Power ISA 3.0 Radix style MMU. Currently
> 
> 
> We also have PPC_8xx do a
> 
>      select ARCH_SUPPORTS_HUGETLBFS
> 
> And of course !PPC_RADIX_MMU (e.g., PPC_64S_HASH_MMU) through 
> PPC_BOOK3S_64.
> 
> Are we sure they cannot end up with gigantic folios through hugetlb?
> 

Yes indeed. My PPC_8xx is OK because I set CONFIG_ARCH_FORCE_MAX_ORDER=9 
(largest hugepage is 8M) but I do get the warning with the default value 
which is 8 (with 16k pages).

For PPC_64S_HASH_MMU, max page size is 16M, we get no warning with 
CONFIG_ARCH_FORCE_MAX_ORDER=8 which is the default value but get the 
warning with CONFIG_ARCH_FORCE_MAX_ORDER=7

Should CONFIG_ARCH_HAS_GIGANTIC_PAGE be set unconditionaly as soon as 
hugepages are selected, or should it depend on 
CONFIG_ARCH_FORCE_MAX_ORDER ? What is the cost of selecting 
CONFIG_ARCH_HAS_GIGANTIC_PAGE ?

Christophe


  reply	other threads:[~2025-11-10 18:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-29  5:49 powerpc/e500: WARNING: at mm/hugetlb.c:4755 hugetlb_add_hstate Sourabh Jain
2025-10-29  8:25 ` David Hildenbrand
2025-11-05 11:32   ` Christophe Leroy
2025-11-06 15:02     ` David Hildenbrand (Red Hat)
2025-11-06 16:19       ` Christophe Leroy
2025-11-07 14:37         ` Ritesh Harjani
2025-11-07 16:11           ` Christophe Leroy
2025-11-10 10:10           ` David Hildenbrand (Red Hat)
2025-11-10 10:33             ` Christophe Leroy
2025-11-10 11:04               ` David Hildenbrand (Red Hat)
2025-11-10 11:27         ` David Hildenbrand (Red Hat)
2025-11-10 18:31           ` Christophe Leroy [this message]
2025-11-11  8:29             ` David Hildenbrand (Red Hat)
2025-11-11 11:21               ` David Hildenbrand (Red Hat)
2025-11-11 11:42                 ` Christophe Leroy
2025-11-11 12:20                   ` David Hildenbrand (Red Hat)
2025-11-12 10:41             ` Ritesh Harjani
2025-11-07  8:00       ` Sourabh Jain
2025-11-07  9:02         ` David Hildenbrand (Red Hat)
2025-11-07 12:35           ` Sourabh Jain
2025-11-07 14:18             ` David Hildenbrand (Red Hat)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1463bcd5-c47b-4c7f-bb13-2664e2e8226e@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=donettom@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=ritesh.list@gmail.com \
    --cc=sourabhjain@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).