Skip to content

Commit

Permalink
powerpc: Tweak copy selection parameter in __copy_tofrom_user_power7()
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Acked-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Andrew Jeffery authored and Michael Ellerman committed May 30, 2017
1 parent 09b6c11 commit a3f952d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/lib/copyuser_power7.S
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a3f952d

Please sign in to comment.