mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Victor Aoqui <victora@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	mpe@ellerman.id.au, khandual@linux.vnet.ibm.com
Cc: victora@br.ibm.com, victora@linux.vnet.ibm.com
Subject: Re: [PATCH v2] powerpc/mm: Implemented default_hugepagesz verification for powerpc
Date: Fri, 21 Jul 2017 12:35:08 +0530	[thread overview]
Message-ID: <87h8y6p8wr.fsf@skywalker.in.ibm.com> (raw)
In-Reply-To: <20170720165838.3549-1-victora@linux.vnet.ibm.com>

Victor Aoqui <victora@linux.vnet.ibm.com> writes:

> Implemented default hugepage size verification (default_hugepagesz=)
> in order to allow allocation of defined number of pages (hugepages=)
> only for supported hugepage sizes.
>
> Signed-off-by: Victor Aoqui <victora@linux.vnet.ibm.com>
> ---
> v2:
>
> - Renamed default_hugepage_setup_sz function to hugetlb_default_size_setup;
>
> - Added powerpc string to error message.
>
>  arch/powerpc/mm/hugetlbpage.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
> index e1bf5ca..3a142fe 100644
> --- a/arch/powerpc/mm/hugetlbpage.c
> +++ b/arch/powerpc/mm/hugetlbpage.c
> @@ -780,6 +780,21 @@ static int __init hugepage_setup_sz(char *str)
>  }
>  __setup("hugepagesz=", hugepage_setup_sz);
>
> +static int __init hugetlb_default_size_setup(char *str)
> +{
> +	unsigned long long size;
> +
> +	size = memparse(str, &str);
> +
> +	if (add_huge_page_size(size) != 0) {
> +		hugetlb_bad_size();
> +		pr_err("Invalid powerpc default huge page size specified(%llu)\n", size);
> +	}
> +
> +	return 1;
> +}
> +__setup("default_hugepagesz=", hugetlb_default_size_setup);
> +

this means we don't core the core function hugetlb_default_setup().
Hence the value default_hstate_size = 0  which means different value
for default_hstate_idx. We use that for hugetlbfs mount. 

>  struct kmem_cache *hugepte_cache;
>  static int __init hugetlbpage_init(void)
>  {
> -- 
> 1.8.3.1

      reply	other threads:[~2017-07-21  7:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-20 16:58 Victor Aoqui
2017-07-21  7:05 ` Aneesh Kumar K.V [this message]

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=87h8y6p8wr.fsf@skywalker.in.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=victora@br.ibm.com \
    --cc=victora@linux.vnet.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

all inboxes | Powered by JetHome®