This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ping: [Patch] aarch64: Thunderx specific memcpy and memmove


On Thu, May 25, 2017 at 8:26 PM, Siddhesh Poyarekar <siddhesh@gotplt.org> wrote:
> On Thursday 25 May 2017 11:19 PM, Wilco Dijkstra wrote:
>> Given the number of micro architectures already existing, it would be a really
>> bad situation to end up with one memcpy per micro architecture...
>
> It's not just per micro-architecture...
>
>> Micro architectures will tend to converge rather than diverge as performance
>> level increases. So I believe it's generally best to use the same instructions for
>> memcpy as for compiled code as that is what CPUs will actually encounter
>> and optimize for. For the rare, very large copies we could do something different
>> if it helps (eg. prefetch, non-temporals, SIMD registers etc).

>
> ... because as you say, micro-architectures may well converge over time
> to some extent, but you will still end up having multiple memcpy
> implementation taking advantage of different features in aarch64
> architecture over time.  For example, SVE routines vs non-SVE routines.
> You'll need both and looking at how x86 has evolved, there will be much
> more to come.

SVE in the ARM world is architectural and not micro-architectural in the context
of this discussion :) .

The difference in the ARM world compared to the x86 world is the number
of micro-architectures that target the same architectural baseline.
Pushing in a memcpy
for every single micro-architecture out there will make the library a
maintenance
nightmare !

And we also need to see some numbers which compare the relative performance
of the routines being put in compared to the generic memcpy otherwise things
will not improve.  Atleast something like this routine is X % better than the
generic memcpy.


regards
Ramana


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]