This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [Patch] aarch64: Thunderx specific memcpy and memmove
- From: Wainer dos Santos Moschetta <wainersm at linux dot vnet dot ibm dot com>
- To: Steve Ellcey <sellcey at caviumnetworks dot com>, libc-alpha <libc-alpha at sourceware dot org>
- Cc: Siddhesh Poyarekar <siddhesh at sourceware dot org>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Date: Sat, 1 Apr 2017 21:01:55 -0300
- Subject: Re: [Patch] aarch64: Thunderx specific memcpy and memmove
- Authentication-results: sourceware.org; auth=none
- References: <1490397926.19074.73.camel@caviumnetworks.com>
In sysdeps/aarch64/multiarch/memcpy_generic.S, it has:
+#include "../memcpy.S"
Is it ok to use relative path here? or rather it's recommended use of the full path since sysdeps?
On 03/24/2017 08:25 PM, 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.
>
> 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.
>
> 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.