From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: leroy christophe <christophe.leroy@c-s.fr>
Cc: Scott Wood <scottwood@freescale.com>,
Anton Blanchard <anton@au1.ibm.com>,
LinuxPPC-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [QUESTION,RFC] cacheable_memcpy() versus memcpy() ==> 8% improvment on FTP throughput
Date: Wed, 11 Feb 2015 19:33:16 +1100 [thread overview]
Message-ID: <1423643596.5965.12.camel@kernel.crashing.org> (raw)
In-Reply-To: <54DB0A6E.7020105@c-s.fr>
On Wed, 2015-02-11 at 08:53 +0100, leroy christophe wrote:
> In powerpc32 architecture there is a function called cacheable_memcpy()
> which does same thing as memcpy() but using dcbz/dcbt instructions for
> an optimised copy (just like __copy_tofrom_user())
> What seems strange is that it is almost nowhere used (only used in
> drivers/net/ethernet/ibm/emac/core.c)
>
> For a try I replaced all memcpy() in include/linux/skbuff.h and
> net/core/skbuff.c by cacheable_memcpy() and I got around 8% improvement
> on FTP throughput on MPC885.
>
> What could be done to generalise the use of cacheable_memcpy() instead
> of memcpy() whenever possible ?
> Indeed, in order to use cacheable_memcpy(), we need
> * The destination to be cacheable
> * The source and destination to not overlap on the same cachelines
>
> Could we check, when calling memcpy(), whether the destination is
> cacheable or not, and if yes redirect the call to cacheable_memcpy() ?
> How can we check that ?
Additionally we could have a P8 implementation that uses unaligned
vectors. Adding Anton to the CC list.
Cheers,
Ben.
prev parent reply other threads:[~2015-02-11 9:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 7:53 [QUESTION,RFC] cacheable_memcpy() versus memcpy() ==> 8% improvment on FTP throughput leroy christophe
2015-02-11 8:33 ` Benjamin Herrenschmidt [this message]
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=1423643596.5965.12.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=anton@au1.ibm.com \
--cc=christophe.leroy@c-s.fr \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=scottwood@freescale.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.