This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/2] aarch64: Optimized memcpy and memmove for Kunpeng processor
- From: "Zhangxuelei (Derek)" <zhangxuelei4 at huawei dot com>
- To: Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "yikunkero at gmail dot com" <yikunkero at gmail dot com>, "Wilco dot Dijkstra at arm dot com" <Wilco dot Dijkstra at arm dot com>
- Cc: nd <nd at arm dot com>
- Date: Wed, 16 Oct 2019 13:53:18 +0000
- Subject: Re: [PATCH 2/2] aarch64: Optimized memcpy and memmove for Kunpeng processor
> i'd like to work on a generic memcpy that's acceptable instead of
> minor variations of memcpy per uarch, i'll have to take a look why
> this one is different from all the others.
>
> it would be nice to see the memcpy-random benchmarks too.
>
> stopping prefetch at 2k is surprising.
Thanks for all the reviews @Sz @Wilco @kero.
We do vary based on ThunderX2 for its good performance for large copies, which is needed by us firstly. And we do find the detect of ThunderX2 version for 96 to 2M bytes copy, at least when running on the Kunpeng arch, even the falkor version is not much better. Therefore, branch was written and we used generic copy, that 64 bytes loop, dst aligned, without prefetch, and it works. We also have simply tried Q register replacing X register in this branch, but it didn't make more sense.
And here is the result of memcpy-random benchmarks :
Function: memcpy
Variant: random
__memcpy_thunderx __memcpy_thunderx2 __memcpy_falkor __memcpy_kunpeng __memcpy_generic
========================================================================================================================
max-size=4096: 32558.90 ( -2.08%) 31987.80 ( -0.29%) 30474.30 ( 4.46%) 31666.30 ( 0.72%) 31896.60
max-size=8192: 31796.80 ( -1.18%) 31423.90 ( 0.01%) 29974.40 ( 4.62%) 30917.90 ( 1.62%) 31427.40
max-size=16384: 33122.80 ( -1.05%) 32058.30 ( 2.20%) 30470.40 ( 7.05%) 31727.90 ( 3.21%) 32779.90
max-size=32768: 32530.10 ( -1.22%) 31912.80 ( 0.71%) 29960.80 ( 6.78%) 31567.60 ( 1.78%) 32139.40
max-size=65536: 33373.60 ( -0.40%) 32476.30 ( 2.30%) 30957.70 ( 6.87%) 32137.00 ( 3.32%) 33240.10
> It seems we should remove the "memmove_kunpeng", and only
> add the "memcpy_kunpeng" in here.
Indeed, redundant wirte of 'memmove_kunpeng' in multiarch/Makefile will be removed in patch v2.
regards,
Xuelei