glibc/sysdeps/aarch64/multiarch
Wilco Dijkstra 2e94e2f5d2 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>
2024-03-21 16:50:51 +00:00
..
dl-symbol-redir-ifunc.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
ifunc-impl-list.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
init-arch.h AArch64: Check kernel version for SVE ifuncs 2024-03-21 16:50:51 +00:00
Makefile AArch64: Remove Falkor memcpy 2023-11-13 16:52:50 +00:00
memchr_generic.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memchr_nosimd.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memchr.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcpy_a64fx.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcpy_generic.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcpy_mops.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcpy_sve.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcpy_thunderx2.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcpy_thunderx.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcpy.c AArch64: Check kernel version for SVE ifuncs 2024-03-21 16:50:51 +00:00
memmove_mops.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memmove.c AArch64: Check kernel version for SVE ifuncs 2024-03-21 16:50:51 +00:00
memset_a64fx.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memset_emag.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memset_generic.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memset_kunpeng.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memset_mops.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memset_zva64.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memset.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strlen_asimd.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strlen_generic.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strlen.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00