[Bug 1951032] Re: AArch64: Backport memcpy improvements
Dave Jones
1951032 at bugs.launchpad.net
Tue Apr 26 13:31:48 UTC 2022
Ran the tests against -updates and -proposed on a Pi 4, Pi 3B+, and Pi
Zero 2 with the following results:
= Raspberry Pi 4 =
length | before (MiB/s) | after (MiB/s) | delta
----------|----------------|----------------|----------
32768 | 83.58 | 83.03 | -0.66%
65536 | 156.08 | 155.69 | -0.25%
131072 | 292.88 | 291.93 | -0.33%
262144 | 543.00 | 550.95 | 1.47%
524288 | 596.54 | 612.14 | 2.62%
1048576 | 640.72 | 643.76 | 0.47%
= Raspberry Pi 3B+ =
length | before (MiB/s) | after (MiB/s) | delta
----------|----------------|----------------|----------
32768 | 55.55 | 55.38 | -0.31%
65536 | 98.39 | 98.36 | -0.03%
131072 | 173.72 | 169.80 | -2.26%
262144 | 165.05 | 161.24 | -2.31%
524288 | 146.80 | 147.16 | 0.25%
1048576 | 221.23 | 221.32 | 0.04%
= Raspberry Pi Zero 2 =
length | before (MiB/s) | after (MiB/s) | delta
----------|----------------|----------------|----------
32768 | 39.09 | 39.32 | 0.58%
65536 | 70.09 | 70.33 | 0.34%
131072 | 125.40 | 122.88 | -2.01%
262144 | 133.79 | 133.76 | -0.02%
524288 | 134.59 | 133.84 | -0.56%
1048576 | 203.99 | 203.89 | -0.04%
Looking much better than before; some mild improvement (and not too much
cost) on the Pi 4 (the only platform where arm64 typically makes sense
in the Pi series), and only minor degradation in the rest.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/1951032
Title:
AArch64: Backport memcpy improvements
Status in glibc package in Ubuntu:
Fix Released
Status in glibc source package in Focal:
Fix Committed
Bug description:
[impact]
glibc 2.32 contained a number of improvements to the memcpy routines for server-grade AArch64 implementations (in particular, graviton2 & graviton3). They should be backported to focal, as the LTS releases are by far the most used on servers.
[test case]
Download the "bench.tar.gz" attachment from this report. It has a README
that explains what to do, but here it is for reference:
benchmark for testing arm64 memcpy improvements in SRU
This is a benchmark that was derived from the memcpy benchmarks in glibc but altered to benchmark the public 'memcpy' symbol and be linked to the
installed libc.
To use this there are 5 steps:
1. build -- just run "make test"
2. run before upgrade -- "make bench-before"
3. upgrade libc6 package -- depends on what is being tested!
4. run again -- "make bench-after"
5. compare -- "make compare"
It produces output like this:
length | before (MiB/s) | after (MiB/s) | delta
----------|----------------|----------------|----------
32768 | 233.74 | 248.03 | 6.11%
65536 | 443.72 | 468.69 | 5.63%
131072 | 853.71 | 895.08 | 4.84%
262144 | 1640.93 | 1718.91 | 4.75%
524288 | 2501.80 | 2604.83 | 4.12%
1048576 | 3896.77 | 4157.74 | 6.70%
On graviton2 systems, this should show an improvement of at least
several percent. On other arm64 systems (raspberry pis of various
vintage, thunderx2, xgene, etc etc) no significant regression should
be seen.
[regression potential]
Rebuilding glibc is always a little risky (toolchain bugs and incompatibilities between the old and new versions can be surprising). But the autopkgtests and some manual general testing can help here.
For this specific change, there is a potential risk that the new
memcpy implementation could be used on a system where it is not in
fact the fastest. We should run the test case not only on the systems
where it is expected to help, but other systems such as the RPi4 and
the launchpad build farm to ensure performance is not regressed there.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1951032/+subscriptions
More information about the foundations-bugs
mailing list