powerpc/lib: Adjust .balign inside string functions for PPC32
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 18 May 2018 13:01:16 +0000 (15:01 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 3 Jun 2018 14:39:19 +0000 (00:39 +1000)
commit1128bb7813a896bd608fb622eee3c26aaf33b473
tree38866fc629ccaa69be843be50329319f7b0ed033
parent56b04d568f880a48d892e840cfaf4efc0f0ce39b
powerpc/lib: Adjust .balign inside string functions for PPC32

commit 87a156fb18fe1 ("Align hot loops of some string functions")
degraded the performance of string functions by adding useless
nops

A simple benchmark on an 8xx calling 100000x a memchr() that
matches the first byte runs in 41668 TB ticks before this patch
and in 35986 TB ticks after this patch. So this gives an
improvement of approx 10%

Another benchmark doing the same with a memchr() matching the 128th
byte runs in 1011365 TB ticks before this patch and 1005682 TB ticks
after this patch, so regardless on the number of loops, removing
those useless nops improves the test by 5683 TB ticks.

Fixes: 87a156fb18fe1 ("Align hot loops of some string functions")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/cache.h
arch/powerpc/lib/string.S