The Linux Kernel Will Be Able To Detect Split-Locks To Then Warn Or Kill Offending Apps
Split locks are when an atomic instruction operates on data spanning multiple cache lines. Due to the atomic nature, a global bus lock is needed when working on two cache lines and that in turn causes a big performance hit for the overall system performance.
This Linux kernel support for detecting split locks is contingent upon x86_64 CPUs supporting the capability for generating alignment check exceptions (#AC) on encountering a split lock. For now the necessary MSR appears to be only supported on Intel CPUs.
By default on supported CPUs the Linux kernel will warn via dmesg when a split lock happens and the offending process. But split_lock_detect=fatal can also be set as a kernel argument where it will send a fatal SIGBUS to the application causing the split lock... The fatal mean being a very transparent way of seeing when a split-lock happens so it can ideally be addressed in the software.
The split lock detection for the Linux kernel is currently queued in x86/cpu. The patch has yet to be mainlined but given the timing may end up being held off until Linux 5.7 rather than making it into 5.6 with its merge window wrapping up this week.