From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
segher@kernel.crashing.org
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH v5 0/3] powerpc/lib: Optimisation of memcmp() and __clear_user() for PPC32
Date: Mon, 28 May 2018 10:49:52 +0000 (UTC) [thread overview]
Message-ID: <cover.1527503958.git.christophe.leroy@c-s.fr> (raw)
This serie intends to optimise memcmp() and __clear_user() 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.
As shown in each individual commit log, second and third patches
provide significant improvment.
Changes in v5:
- Removed the handling of Little Endian, as PPC32 kernel only support Big Endian
at the time being, and because unaligned accesses should be handled differently
in LE.
Changes in v4:
- In memcmp(), dropped the special handling for when length is 0. Handling it
through the small length path.
Changes in v3:
- Fixed the sign of the result returned by memcmp() by using a logical
comparison of u32 words and returning -1, 0 or 1 instead of doing a substract.
- In first patch, replaced PPC_LCMPI by cmpwi
- Fixed licence in string_32.S
- Removed the two last patches from the serie. They will be handled later as
they require further tests and analysis to properly identify their real benefit
in all possible cases.
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 (3):
powerpc/lib: move PPC32 specific functions out of string.S
powerpc/lib: optimise 32 bits __clear_user()
powerpc/lib: optimise PPC32 memcmp
arch/powerpc/lib/Makefile | 5 +-
arch/powerpc/lib/string.S | 61 ---------------------
arch/powerpc/lib/string_32.S | 124 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 127 insertions(+), 63 deletions(-)
create mode 100644 arch/powerpc/lib/string_32.S
--
2.13.3
next reply other threads:[~2018-05-28 10:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-28 10:49 Christophe Leroy [this message]
2018-05-28 10:49 ` [PATCH v5 1/3] powerpc/lib: move PPC32 specific functions out of string.S Christophe Leroy
2018-05-28 10:49 ` [PATCH v5 2/3] powerpc/lib: optimise 32 bits __clear_user() Christophe Leroy
2018-05-28 10:49 ` [PATCH v5 3/3] powerpc/lib: optimise PPC32 memcmp Christophe Leroy
2018-05-29 20:03 ` Mathieu Malaterre
2018-05-30 8:47 ` Christophe LEROY
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=cover.1527503958.git.christophe.leroy@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=segher@kernel.crashing.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).