about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/dl-machine.h
diff options
context:
space:
mode:
authorWilco Dijkstra <wilco.dijkstra@arm.com>2024-03-21 16:48:33 +0000
committerWilco Dijkstra <wilco.dijkstra@arm.com>2024-04-08 17:36:40 +0100
commitf4a45af3683adc54bf4b813b56be1fd19e3f1f5a (patch)
treeb35143256794ebc92dcf6b56a558e8037756828a /sysdeps/powerpc/powerpc64/dl-machine.h
parent7f3c1433815c4c00755a1b7c2f015d18196c6c0e (diff)
downloadglibc-f4a45af3683adc54bf4b813b56be1fd19e3f1f5a.tar.gz
glibc-f4a45af3683adc54bf4b813b56be1fd19e3f1f5a.tar.xz
glibc-f4a45af3683adc54bf4b813b56be1fd19e3f1f5a.zip
AArch64: Check kernel version for SVE ifuncs
Old Linux kernels disable SVE after every system call.  Calling the
SVE-optimized memcpy afterwards will then cause a trap to reenable SVE.
As a result, applications with a high use of syscalls may run slower with
the SVE memcpy.  This is true for kernels between 4.15.0 and before 6.2.0,
except for 5.14.0 which was patched.  Avoid this by checking the kernel
version and selecting the SVE ifunc on modern kernels.

Parse the kernel version reported by uname() into a 24-bit kernel.major.minor
value without calling any library functions.  If uname() is not supported or
if the version format is not recognized, assume the kernel is modern.

Tested-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
(cherry picked from commit 2e94e2f5d2bf2de124c8ad7da85463355e54ccb2)
Diffstat (limited to 'sysdeps/powerpc/powerpc64/dl-machine.h')
0 files changed, 0 insertions, 0 deletions