public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Szabolcs Nagy <szabolcs.nagy@arm.com>
To: Steve Ellcey <sellcey@caviumnetworks.com>,
	libc-alpha <libc-alpha@sourceware.org>
Cc: <nd@arm.com>, Siddhesh Poyarekar <siddhesh@sourceware.org>,
	Adhemerval Zanella <adhemerval.zanella@linaro.org>
Subject: Re: [Patch] aarch64: Thunderx specific memcpy and memmove
Date: Mon, 27 Mar 2017 10:45:00 -0000	[thread overview]
Message-ID: <58D8ED38.20203@arm.com> (raw)
In-Reply-To: <1490397926.19074.73.camel@caviumnetworks.com>

On 24/03/17 23:25, Steve Ellcey wrote:
> Now that the IFUNC infrastructure for aarch64 is in place, here is a
> patch to use it to create ThunderX specific versions of memcpy and
> memmove.
> 
> This was part of my original patch before it was split in two and a
> couple of issues were raised at that time. 
> 
> Siddhesh Poyarekar wanted to separate the generic and thunderx copies
> of memcpy/memmove instead of using ifdefs in a combined source file.
> I prefer the ifdef version as a cleaner implementation with less code
> duplication but I can change it if that is the consensus.
> 

both are fine with me.

> Also Adhemerval Zanella did some benchmarking that showed the
> prefetching done in the thunderx version might be appropriate for the
> generic version.  However if you look at the prefetching we only do it
> every other time through the loop.  This is because the loop copies 64
> bytes and the ThunderX cache line size is 128 bytes.  If other aarch64
> chips have a 64 byte cache line they might want a different prefetching
> setup.
> 
> If people think we should use the ThunderX version of memcpy for all
> aarch64 systems I am happy to drop this patch and create one that just
> changes memcpy.S to do the ThunderX style prefetches for all aarch64
> systems.
> 

adding prefetches to the generic code is preferable
if it can make both thunderx and generic users happy.

we need to find what's the best way to add the prefetches,
the new memcpy benchmarks may help here.

> Steve Ellcey
> sellcey@cavium.com
> 
> 
> 2017-03-24  Steve Ellcey  <sellcey@caviumnetworks.com>
> 
> 	* sysdeps/aarch64/memcpy.S (MEMMOVE, MEMCPY): New macros.
> 	(memmove): Use MEMMOVE for name.
> 	(memcpy): Use MEMCPY for name.  Add loop with prefetching
> 	under USE_THUNDERX macro.
> 	* sysdeps/aarch64/multiarch/Makefile: New file.
> 	* sysdeps/aarch64/multiarch/ifunc-impl-list.c: Likewise.
> 	* sysdeps/aarch64/multiarch/init-arch.h: Likewise.
> 	* sysdeps/aarch64/multiarch/memcpy.c: Likewise.
> 	* sysdeps/aarch64/multiarch/memcpy_generic.S: Likewise.
> 	* sysdeps/aarch64/multiarch/memcpy_thunderx.S: Likewise.
> 	* sysdeps/aarch64/multiarch/memmove.c: Likewise.
> 

  reply	other threads:[~2017-03-27 10:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 23:25 Steve Ellcey
2017-03-27 10:45 ` Szabolcs Nagy [this message]
2017-03-27 10:52 ` Ramana Radhakrishnan
2017-03-27 21:35   ` Steve Ellcey
2017-04-02  0:02 ` Wainer dos Santos Moschetta
2017-04-06 20:48   ` Steve Ellcey
2017-05-02  3:51 ` Siddhesh Poyarekar

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=58D8ED38.20203@arm.com \
    --to=szabolcs.nagy@arm.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=nd@arm.com \
    --cc=sellcey@caviumnetworks.com \
    --cc=siddhesh@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).