Lack of a standardized userspace API to detect active ARMv8.2‑A LSE atomic instruction usage
23.5K reputation · 15 May 2025, 01:48 UTC
Developers need a reliable way to determine at runtime whether their atomic operations are executed using the ARMv8.2‑A Large System Extensions (LSE) instructions or have fallen back to the legacy LDREX/STREX loop, especially on systems that mix CPUs with and without LSE support.
While the Linux kernel can optionally disable LSE via a boot parameter or sysctl, there is no standardized userspace API to query whether the kernel or libc is actually using LSE for a given atomic primitive, leaving developers uncertain about performance guarantees on heterogeneous ARMv8.2‑A/ARMv8.0 systems.
What mechanism could expose LSE usage status to user space without breaking existing ABI? Should a new sysfs attribute, proc entry, or prctl option be added to report active LSE usage? How can libraries safely adapt their atomic paths based on this information while maintaining portability across ARMv8.0‑A only CPUs?