LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe LEROY <christophe.leroy@c-s.fr>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Scott Wood <oss@buserror.net>,
	Nicholas Piggin <npiggin@gmail.com>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 3/3] powerpc/8xx: Increase the number of mm slices
Date: Tue, 16 Jan 2018 17:16:02 +0100	[thread overview]
Message-ID: <61ade5ee-b72e-edf6-6b5d-0d1b03e27cab@c-s.fr> (raw)
In-Reply-To: <87zi5dajgj.fsf@linux.vnet.ibm.com>



Le 16/01/2018 à 16:53, Aneesh Kumar K.V a écrit :
> Christophe Leroy <christophe.leroy@c-s.fr> writes:
> 
>> On the 8xx, we can have as many slices as PMD entries.
>> This means we could have 1024 slices in 4k size pages mode
>> and 64 slices in 16k size pages.
>>
>> However, due to a stack overflow in slice_get_unmapped_area(),
>> we limit to 512 slices.
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
>> ---
>>   arch/powerpc/include/asm/mmu-8xx.h | 6 +++++-
>>   arch/powerpc/include/asm/page_32.h | 3 ++-
>>   2 files changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/powerpc/include/asm/mmu-8xx.h b/arch/powerpc/include/asm/mmu-8xx.h
>> index d669d0062da4..40aa7b0cd0dc 100644
>> --- a/arch/powerpc/include/asm/mmu-8xx.h
>> +++ b/arch/powerpc/include/asm/mmu-8xx.h
>> @@ -171,7 +171,11 @@ typedef struct {
>>   	unsigned long vdso_base;
>>   #ifdef CONFIG_PPC_MM_SLICES
>>   	u16 user_psize;		/* page size index */
>> -	unsigned char low_slices_psize[8]; /* 16 slices */
>> +#if defined(CONFIG_PPC_16K_PAGES)
>> +	unsigned char low_slices_psize[32]; /* 64 slices */
>> +#else
>> +	unsigned char low_slices_psize[256]; /* 512 slices */
>> +#endif
> 
> These #ifdef should be 8xx and then 16K.

We are in file asm/mmu-8xx.h so it obviously only applies to 8xx

Christophe

> 
> 
>>   	unsigned char high_slices_psize[0];
>>   	unsigned long slb_addr_limit;
>>   #endif
>> diff --git a/arch/powerpc/include/asm/page_32.h b/arch/powerpc/include/asm/page_32.h
>> index f7d1bd1183c8..43695ce7ee07 100644
>> --- a/arch/powerpc/include/asm/page_32.h
>> +++ b/arch/powerpc/include/asm/page_32.h
>> @@ -62,7 +62,8 @@ extern void copy_page(void *to, void *from);
>>   
>>   #ifdef CONFIG_PPC_MM_SLICES
>>   
>> -#define SLICE_LOW_SHIFT		28
>> +/* SLICE_LOW_SHIFT >= 23 to avoid stack overflow in slice_get_unmapped_area() */
>> +#define SLICE_LOW_SHIFT		(PMD_SHIFT > 23 ? PMD_SHIFT : 23)
>>   #define SLICE_HIGH_SHIFT	0
>>   
>>   #define SLICE_LOW_TOP		(0xfffffffful)
>> -- 
>> 2.13.3

  reply	other threads:[~2018-01-16 16:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 16:44 [PATCH 1/3] powerpc/32: Fix hugepage allocation on 8xx at hint address Christophe Leroy
2018-01-05 16:44 ` [PATCH 2/3] powerpc/mm: Allow more than 16 low slices Christophe Leroy
2018-01-16 15:52   ` Aneesh Kumar K.V
2018-01-16 16:37     ` Christophe LEROY
2018-01-05 16:44 ` [PATCH 3/3] powerpc/8xx: Increase the number of mm slices Christophe Leroy
2018-01-16 15:53   ` Aneesh Kumar K.V
2018-01-16 16:16     ` Christophe LEROY [this message]
2018-01-16 15:49 ` [PATCH 1/3] powerpc/32: Fix hugepage allocation on 8xx at hint address Aneesh Kumar K.V
2018-01-16 16:31   ` Christophe LEROY
2018-01-16 16:41     ` Aneesh Kumar K.V
2018-01-16 16:57       ` Christophe LEROY
2018-01-17  5:23         ` Aneesh Kumar K.V
2018-01-17  9:47           ` Christophe LEROY
2018-01-16 16:43     ` Aneesh Kumar K.V
2018-01-16 16:53       ` Christophe LEROY

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=61ade5ee-b72e-edf6-6b5d-0d1b03e27cab@c-s.fr \
    --to=christophe.leroy@c-s.fr \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=oss@buserror.net \
    --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