linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] powerpc/lib: Optimisation of string functions (mainly for PPC32)
@ 2018-05-17 10:49 Christophe Leroy
  2018-05-17 10:49 ` [PATCH v2 1/5] powerpc/lib: move PPC32 specific functions out of string.S Christophe Leroy
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Christophe Leroy @ 2018-05-17 10:49 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linux-kernel, linuxppc-dev

This serie intend to optimise string functions for PPC32 in the
same spirit as already done on PPC64.

The first patch moves PPC32 specific functions from string.S into
a dedicated file named string_32.S
The second patch rewrites __clear_user() by using dcbz intruction
The third patch rewrites memcmp() to compare 32 bits words instead
of comparing byte per byte.
The fourth patch removes NUL size verification from the assembly
functions so that GCC can optimise them out when the size is constant
The last patch inlines memcmp() for constant sizes <= 16

As shown in each individual commit log, second, third and last patches
provides significant improvment.

Changes in v2:
- Moved out the patch removing the hot loop alignment on PPC32
- Squashed the changes related to NUL size verification in a single patch
- Reordered the patches in a more logical order
- Modified the inlining patch to avoid warning about impossibility to version symbols.

Christophe Leroy (5):
  powerpc/lib: move PPC32 specific functions out of string.S
  powerpc/lib: optimise 32 bits __clear_user()
  powerpc/lib: optimise PPC32 memcmp
  powerpc/lib: inline string functions NUL size verification
  powerpc/lib: inline memcmp() for small constant sizes

 arch/powerpc/include/asm/string.h      |  91 ++++++++++++++++++++-
 arch/powerpc/kernel/prom_init_check.sh |   2 +-
 arch/powerpc/lib/Makefile              |   5 +-
 arch/powerpc/lib/memcmp_64.S           |   8 ++
 arch/powerpc/lib/string.S              |  75 ++++-------------
 arch/powerpc/lib/string_32.S           | 145 +++++++++++++++++++++++++++++++++
 6 files changed, 259 insertions(+), 67 deletions(-)
 create mode 100644 arch/powerpc/lib/string_32.S

-- 
2.13.3

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-05-18 15:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-17 10:49 [PATCH v2 0/5] powerpc/lib: Optimisation of string functions (mainly for PPC32) Christophe Leroy
2018-05-17 10:49 ` [PATCH v2 1/5] powerpc/lib: move PPC32 specific functions out of string.S Christophe Leroy
2018-05-17 13:33   ` Segher Boessenkool
2018-05-17 10:49 ` [PATCH v2 2/5] powerpc/lib: optimise 32 bits __clear_user() Christophe Leroy
2018-05-17 10:49 ` [PATCH v2 3/5] powerpc/lib: optimise PPC32 memcmp Christophe Leroy
2018-05-17 10:49 ` [PATCH v2 4/5] powerpc/lib: inline string functions NUL size verification Christophe Leroy
2018-05-17 10:49 ` [PATCH v2 5/5] powerpc/lib: inline memcmp() for small constant sizes Christophe Leroy
2018-05-17 13:03   ` Mathieu Malaterre
2018-05-17 13:21     ` Christophe LEROY
2018-05-17 13:44       ` Benjamin Herrenschmidt
2018-05-17 13:55   ` Segher Boessenkool
2018-05-18 10:35     ` Christophe Leroy
2018-05-18 15:20       ` Segher Boessenkool

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).