linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: paulus@samba.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 2/2] powerpc/mm: don't do tlbie for updatepp request with NO HPTE fault
Date: Tue, 02 Dec 2014 12:21:24 +0530	[thread overview]
Message-ID: <87ppc2h7df.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1417478377.7182.17.camel@kernel.crashing.org>

Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:

> On Mon, 2014-11-03 at 20:21 +0530, Aneesh Kumar K.V wrote:
>> --- a/arch/powerpc/mm/hash_native_64.c
>> +++ b/arch/powerpc/mm/hash_native_64.c
>> @@ -283,11 +283,11 @@ static long native_hpte_remove(unsigned long hpte_group)
>>  
>>  static long native_hpte_updatepp(unsigned long slot, unsigned long newpp,
>>                                  unsigned long vpn, int bpsize,
>> -                                int apsize, int ssize, int local)
>> +                                int apsize, int ssize, unsigned long flags)
>>  {
>>         struct hash_pte *hptep = htab_address + slot;
>>         unsigned long hpte_v, want_v;
>> -       int ret = 0;
>> +       int ret = 0, local = 0;
>>  
>>         want_v = hpte_encode_avpn(vpn, bpsize, ssize);
>>  
>> @@ -322,8 +322,15 @@ static long native_hpte_updatepp(unsigned long slot, unsigned long newpp,
>>                 }
>>                 native_unlock_hpte(hptep);
>>         }
>> -       /* Ensure it is out of the tlb too. */
>> -       tlbie(vpn, bpsize, apsize, ssize, local);
>> +
>> +       if (flags & HPTE_LOCAL_UPDATE)
>> +               local = 1;
>> +       /*
>> +        * Ensure it is out of the tlb too if it is not a nohpte fault
>> +        */
>> +       if (!(flags & HPTE_NOHPTE_UPDATE))
>> +               tlbie(vpn, bpsize, apsize, ssize, local);
>> +
>>         return ret;
>>  }
>
> An additional refinement we discussed that I'd like you to test/measure
> is to basically always be local for updatepp unless we have a flag that
> forces us not to.
>
> That flag would be set by copro faults only.
>
> Can you do something on top of this series ?

Yes. Will try that out.

-aneesh

  reply	other threads:[~2014-12-02  6:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03 14:51 [PATCH 1/2] powerpc/mm: Check for matching hpte without taking hpte lock Aneesh Kumar K.V
2014-11-03 14:51 ` [PATCH 2/2] powerpc/mm: don't do tlbie for updatepp request with NO HPTE fault Aneesh Kumar K.V
2014-12-01 23:59   ` Benjamin Herrenschmidt
2014-12-02  6:51     ` Aneesh Kumar K.V [this message]
2014-12-02  0:39   ` Michael Ellerman
2014-12-02  6:55     ` Aneesh Kumar K.V
2014-12-02  3:09   ` Benjamin Herrenschmidt
2014-12-02  5:01     ` 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=87ppc2h7df.fsf@linux.vnet.ibm.com \
    --to=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;
as well as URLs for NNTP newsgroup(s).