All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe LEROY <christophe.leroy@c-s.fr>
To: Nicholas Piggin <npiggin@gmail.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC REBASED 5/5] powerpc/mm/slice: use the dynamic high slice size to limit bitmap operations
Date: Thu, 1 Mar 2018 08:09:55 +0100	[thread overview]
Message-ID: <4e3c5281-427b-abe8-9c80-f2c1a0247e28@c-s.fr> (raw)
In-Reply-To: <20180228165331.6e09959d@roar.ozlabs.ibm.com>



Le 28/02/2018 à 07:53, Nicholas Piggin a écrit :
> On Tue, 27 Feb 2018 18:11:07 +0530
> "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:
> 
>> Nicholas Piggin <npiggin@gmail.com> writes:
>>
>>> On Tue, 27 Feb 2018 14:31:07 +0530
>>> "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:
>>>   
>>>> Christophe Leroy <christophe.leroy@c-s.fr> writes:
>>>>    
>>>>> The number of high slices a process might use now depends on its
>>>>> address space size, and what allocation address it has requested.
>>>>>
>>>>> This patch uses that limit throughout call chains where possible,
>>>>> rather than use the fixed SLICE_NUM_HIGH for bitmap operations.
>>>>> This saves some cost for processes that don't use very large address
>>>>> spaces.
>>>>
>>>> I haven't really looked at the final code. One of the issue we had was
>>>> with the below scenario.
>>>>
>>>> mmap(addr, len) where addr < 128TB and addr+len > 128TB  We want to make
>>>> sure we build the mask such that we don't find the addr available.
>>>
>>> We should run it through the mmap regression tests. I *think* we moved
>>> all of that logic from the slice code to get_ummapped_area before going
>>> in to slices. I may have missed something though, it would be good to
>>> have more eyes on it.
>>>   
>>
>> mmap(-1,...) failed with the test. Something like below fix it
>>
>> @@ -756,7 +770,7 @@ void slice_set_user_psize(struct mm_struct *mm, unsigned int psize)
>>          mm->context.low_slices_psize = lpsizes;
>>   
>>          hpsizes = mm->context.high_slices_psize;
>> -       high_slices = GET_HIGH_SLICE_INDEX(mm->context.slb_addr_limit);
>> +       high_slices = SLICE_NUM_HIGH;
>>          for (i = 0; i < high_slices; i++) {
>>                  mask_index = i & 0x1;
>>                  index = i >> 1;
>>
>> I guess for everything in the mm_context_t, we should compute it till
>> SLICE_NUM_HIGH. The reason for failure was, even though we recompute the
>> slice mask cached in mm_context on slb_addr_limit, it was still derived
>> from the high_slices_psizes which was computed with lower value.
> 
> Okay thanks for catching that Aneesh. I guess that's a slow path so it
> should be okay. Christophe if you're taking care of the series can you
> fold it in? Otherwise I'll do that after yours gets merged.
> 

I'm not really taking care of your serie, just took it once to see how 
it fits on the 8xx.
I prefer if you can handle them. If you need my help for any test on 
PPC32 don't hesitate to ask.

Christophe

  parent reply	other threads:[~2018-03-01  7:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-12 18:12 [RFC REBASED 1/5] powerpc/mm/slice: pass pointers to struct slice_mask where possible Christophe Leroy
2018-02-12 18:12 ` [RFC REBASED 2/5] powerpc/mm/slice: implement a slice mask cache Christophe Leroy
2018-02-12 18:12 ` [RFC REBASED 3/5] powerpc/mm/slice: implement slice_check_range_fits Christophe Leroy
2018-02-27  7:20   ` Aneesh Kumar K.V
2018-02-27  9:04     ` Nicholas Piggin
2018-02-12 18:12 ` [RFC REBASED 4/5] powerpc/mm/slice: Use const pointers to cached slice masks where possible Christophe Leroy
2018-02-27  7:29   ` Aneesh Kumar K.V
2018-02-27  9:08     ` Nicholas Piggin
2018-02-12 18:12 ` [RFC REBASED 5/5] powerpc/mm/slice: use the dynamic high slice size to limit bitmap operations Christophe Leroy
2018-02-27  9:01   ` Aneesh Kumar K.V
2018-02-27  9:11     ` Nicholas Piggin
2018-02-27 12:41       ` Aneesh Kumar K.V
2018-02-28  6:53         ` Nicholas Piggin
2018-02-28  6:59           ` Aneesh Kumar K.V
2018-03-01  7:09           ` Christophe LEROY [this message]
2018-03-01  9:22             ` Nicholas Piggin
2018-02-28  7:07   ` Aneesh Kumar K.V
     [not found] ` <87muzu7w58.fsf@linux.vnet.ibm.com>
2018-02-27  7:04   ` [RFC REBASED 1/5] powerpc/mm/slice: pass pointers to struct slice_mask where possible 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=4e3c5281-427b-abe8-9c80-f2c1a0247e28@c-s.fr \
    --to=christophe.leroy@c-s.fr \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@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.