linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/2] powerpc/mm/radix: Don't do page walk cache flush when doing full mm flush
Date: Mon, 10 Apr 2017 13:16:08 +1000	[thread overview]
Message-ID: <20170410131608.2f821c59@kryten> (raw)
In-Reply-To: <1491057708-15934-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>

On Sat,  1 Apr 2017 20:11:47 +0530
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:

> For fullmm tlb flush, we do a flush with RIC_FLUSH_ALL which will
> invalidate all related caches (radix__tlb_flush()). Hence the pwc
> flush is not needed.

Thanks Aneesh. I see a 3x improvement in exec performance with these
2 patches.

Acked-by: Anton Blanchard <anton@samba.org>

Anton

> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
>  arch/powerpc/mm/tlb-radix.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
> index 83dc1ccc2fa1..f3e58bd60d1a 100644
> --- a/arch/powerpc/mm/tlb-radix.c
> +++ b/arch/powerpc/mm/tlb-radix.c
> @@ -129,6 +129,12 @@ void radix__local_flush_tlb_pwc(struct
> mmu_gather *tlb, unsigned long addr) {
>  	unsigned long pid;
>  	struct mm_struct *mm = tlb->mm;
> +	/*
> +	 * If we are doing a full mm flush, we will do a tlb flush
> +	 * with RIC_FLUSH_ALL later.
> +	 */
> +	if (tlb->fullmm)
> +		return;
>  
>  	preempt_disable();
>  
> @@ -195,6 +201,12 @@ void radix__flush_tlb_pwc(struct mmu_gather
> *tlb, unsigned long addr) unsigned long pid;
>  	struct mm_struct *mm = tlb->mm;
>  
> +	/*
> +	 * If we are doing a full mm flush, we will do a tlb flush
> +	 * with RIC_FLUSH_ALL later.
> +	 */
> +	if (tlb->fullmm)
> +		return;
>  	preempt_disable();
>  
>  	pid = mm->context.id;

  parent reply	other threads:[~2017-04-10  3:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-01 14:41 [PATCH 1/2] powerpc/mm/radix: Don't do page walk cache flush when doing full mm flush Aneesh Kumar K.V
2017-04-01 14:41 ` [PATCH 2/2] powerpc/mm/radix: Remove unnecessary ptesync Aneesh Kumar K.V
2017-04-10  3:11   ` Anton Blanchard
2017-04-10 22:49   ` [2/2] " Michael Ellerman
2017-04-10  3:16 ` Anton Blanchard [this message]
2017-04-10 22:49 ` [1/2] powerpc/mm/radix: Don't do page walk cache flush when doing full mm flush Michael Ellerman

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=20170410131608.2f821c59@kryten \
    --to=anton@samba.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --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).