From: Anton Blanchard <anton@samba.org>
To: Andrew Jeffery <andrew@aj.id.au>
Cc: linuxppc-dev@lists.ozlabs.org, benh@kernel.crashing.org,
paulus@samba.org, mpe@ellerman.id.au, npiggin@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc: Tweak copy selection parameter in __copy_tofrom_user_power7()
Date: Fri, 19 May 2017 03:08:23 +1000 [thread overview]
Message-ID: <20170519030823.08966186@kryten> (raw)
In-Reply-To: <20170512035810.15070-1-andrew@aj.id.au>
Hi Andrew,
> Experiments with the netperf benchmark indicated that the size
> selecting VMX-based copies in __copy_tofrom_user_power7() was
> suboptimal on POWER8. Measurements showed that parity was in the
> neighbourhood of 3328 bytes, rather than greater than 4096. The
> change gives a 1.5-2.0% improvement in performance for 4096-byte
> buffers, reducing the relative time spent in
> __copy_tofrom_user_power7() from approximately 7% to approximately 5%
> in the TCP_RR benchmark.
Nice work! All our context switch optimisations we've made over
the last year has likely moved the break even point for this.
Acked-by: Anton Blanchard <anton@samba.org>
Anton
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
> arch/powerpc/lib/copyuser_power7.S | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/lib/copyuser_power7.S
> b/arch/powerpc/lib/copyuser_power7.S index a24b4039352c..706b7cc19846
> 100644 --- a/arch/powerpc/lib/copyuser_power7.S
> +++ b/arch/powerpc/lib/copyuser_power7.S
> @@ -82,14 +82,14 @@
> _GLOBAL(__copy_tofrom_user_power7)
> #ifdef CONFIG_ALTIVEC
> cmpldi r5,16
> - cmpldi cr1,r5,4096
> + cmpldi cr1,r5,3328
>
> std r3,-STACKFRAMESIZE+STK_REG(R31)(r1)
> std r4,-STACKFRAMESIZE+STK_REG(R30)(r1)
> std r5,-STACKFRAMESIZE+STK_REG(R29)(r1)
>
> blt .Lshort_copy
> - bgt cr1,.Lvmx_copy
> + bge cr1,.Lvmx_copy
> #else
> cmpldi r5,16
>
next prev parent reply other threads:[~2017-05-18 17:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 3:58 [PATCH] powerpc: Tweak copy selection parameter in __copy_tofrom_user_power7() Andrew Jeffery
2017-05-18 17:08 ` Anton Blanchard [this message]
2017-05-30 9:11 ` 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=20170519030823.08966186@kryten \
--to=anton@samba.org \
--cc=andrew@aj.id.au \
--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=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).