All of lore.kernel.org
 help / color / mirror / Atom feed
From: Balbir Singh <bsingharora@gmail.com>
To: Rashmica Gupta <rashmicy@gmail.com>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH V2] powerpc/Kconfig: Update config option based on page size.
Date: Fri, 19 Feb 2016 17:07:53 +1100	[thread overview]
Message-ID: <56C6B139.8000605@gmail.com> (raw)
In-Reply-To: <1455860327-22913-1-git-send-email-rashmicy@gmail.com>



On 19/02/16 16:38, Rashmica Gupta wrote:
> Currently on PPC64 changing kernel pagesize from 4K to 64K leaves
> FORCE_MAX_ZONEORDER set to 13 - which produces a compile error.
>
> The error occurs because of the following constraint (from
> include/linux/mmzone.h) being violated:
>
> 	MAX_ORDER -1 + PAGESHIFT <= SECTION_SIZE_BITS.
>
> Expanding this out, we get:
>
> 	FORCE_MAX_ZONEBITS <= 25 - PAGESHIFT,
>
> which requires, for a 64K page, FORCE_MAX_ZONEBITS <= 9. Thus set max
> value of FORCE_MAX_ZONEORDER for 64K pages to 9, and 4K pages to 13.
>
> Also, check the minimum value:
> In include/linux/huge_mm.h, we have the constraint HPAGE_PMD_ORDER <
> MAX_ORDER which expands out to:
>
> 	PTE_INDEX_SIZE < FORCE_MAX_ZONEORDER.
>
> PTE_INDEX_SIZE is:
> 	9 (4k hash or no hash 4K pgtable) or
> 	8 (64K hash or no hash 64K pgtable).
> Thus a min value of 8 for 64K pages and 9 for 4K pages is reasonable.
>
> So, update the range of FORCE_MAX_ZONEORDER from 9-64 to 8-9 for 64K pages
> and from 13-64 to 9-13 for 4K pages.
>
> Signed-off-by: Rashmica Gupta <rashmicy@gmail.com>
> ---
>
> v2: Changed the range for 4K pages and minimum for 64K pages as suggested
> by Balbir Singh. 
>
>
>  arch/powerpc/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index e4824fd04bb7..b933530821fb 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -585,9 +585,9 @@ endchoice
>  
>  config FORCE_MAX_ZONEORDER
>  	int "Maximum zone order"
> -	range 9 64 if PPC64 && PPC_64K_PAGES
> +	range 8 9 if PPC64 && PPC_64K_PAGES
>  	default "9" if PPC64 && PPC_64K_PAGES
> -	range 13 64 if PPC64 && !PPC_64K_PAGES
> +	range 9 13 if PPC64 && !PPC_64K_PAGES
>  	default "13" if PPC64 && !PPC_64K_PAGES
>  	range 9 64 if PPC32 && PPC_16K_PAGES
>  	default "9" if PPC32 && PPC_16K_PAGES
Reviewed-by: Balbir Singh <bsingharora@gmail.com>

Balbir Singh

  reply	other threads:[~2016-02-19  6:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-19  5:38 [PATCH V2] powerpc/Kconfig: Update config option based on page size Rashmica Gupta
2016-02-19  6:07 ` Balbir Singh [this message]
2016-04-11 12:35 ` [V2] " Michael Ellerman
2016-04-19 14:59   ` Aneesh Kumar K.V
2016-04-19 23:09     ` Balbir Singh
2016-09-14 10:40     ` santhosh
2016-09-15 23:26       ` Michael Ellerman
2016-09-16  6:03       ` Balbir Singh
2016-09-16 15:16         ` Aneesh Kumar K.V
2016-09-19  7:15           ` Balbir Singh

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=56C6B139.8000605@gmail.com \
    --to=bsingharora@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=rashmicy@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.