This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add ifunc memcpy and memmove for aarch64
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: Siddhesh Poyarekar <siddhesh at gotplt dot org>, "sellcey at caviumnetworks dot com" <sellcey at caviumnetworks dot com>
- Cc: "adhemerval dot zanella at linaro dot org" <adhemerval dot zanella at linaro dot org>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, nd <nd at arm dot com>
- Date: Tue, 7 Feb 2017 12:42:16 +0000
- Subject: Re: [PATCH] Add ifunc memcpy and memmove for aarch64
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco dot Dijkstra at arm dot com;
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Siddhesh wrote:
> I think it would be cleaner to put the full generic and thunderx
> implementations in separate files instead of trying to do this macro
> dance because it keeps micro-architecture details separate. Assembly
> code is hard to maintain as it is without adding conditional compilation
> using macros.
I agree we want to avoid using conditional compilation as much as possible.
On the other hand duplication is a bad idea too, I've seen too many cases where
bugs were only fixed in one of the N duplicates.
However I'm actually wondering whether we need an ifunc for this case.
For large copies from L2 I think adding a prefetch should be benign even on
cores that don't need it, so if the benchmarks confirm this we should consider
updating the generic memcpy.
> I also second Adhemerval's suggestion to separate the patch to add the
> framework from the one to add the thunderx ifunc. It makes for easier
> cherry picking and git-blaming.
Agreed.
Wilco