From: Michael Ellerman <mpe@ellerman.id.au>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
benh@kernel.crashing.org, paulus@samba.org
Cc: linuxppc-dev@lists.ozlabs.org,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: [PATCH] powerpc/mm: Disable registering 16G hugepage size for powernv platform
Date: Mon, 24 Jul 2017 20:28:13 +1000 [thread overview]
Message-ID: <87wp6yjfia.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <1500881167-9389-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:
> We don't support allocating them runtime. Only supported mechanism as of now is
> HMC based hypervisor interface. So disable 16G hugetlb on powernv platform
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
>
> May be this should go to -stable ?. To show the 16G pagesize in
> /sys/kernel/mm/hugepages/ confuse users
It's a bit of a hack :/
16G also shows up on pseries, when there are no pages pre-allocated,
which is also confusing.
Ideally we'd only show sizes that can be allocated at runtime, OR were
preallocated, regardless of platform.
Is there an easy way to do that?
cheers
> arch/powerpc/mm/hugetlbpage.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
> index e1bf5ca397fe..28ea94da0707 100644
> --- a/arch/powerpc/mm/hugetlbpage.c
> +++ b/arch/powerpc/mm/hugetlbpage.c
> @@ -24,6 +24,7 @@
> #include <asm/tlb.h>
> #include <asm/setup.h>
> #include <asm/hugetlb.h>
> +#include <asm/machdep.h>
>
> #ifdef CONFIG_HUGETLB_PAGE
>
> @@ -749,7 +750,8 @@ static int __init add_huge_page_size(unsigned long long size)
> return -EINVAL;
> }
> } else {
> - if (mmu_psize != MMU_PAGE_16M && mmu_psize != MMU_PAGE_16G)
> + if ((mmu_psize != MMU_PAGE_16M && mmu_psize != MMU_PAGE_16G)
> + || (mmu_psize == MMU_PAGE_16G && machine_is(powernv)))
> return -EINVAL;
> }
> #endif
> --
> 2.7.4
next prev parent reply other threads:[~2017-07-24 10:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-24 7:26 [PATCH] powerpc/mm: Disable registering 16G hugepage size for powernv platform Aneesh Kumar K.V
2017-07-24 10:28 ` Michael Ellerman [this message]
2017-07-25 5:07 ` Aneesh Kumar K.V
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=87wp6yjfia.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
/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