Intel Bus Lock Detection For The Linux Kernel Proceeding
Written by Michael Larabel in Intel on 1 November 2020 at 05:24 AM EST. 6 Comments
INTEL --
Earlier this year the Linux kernel landed split lock detection for being able to detect and optionally kill processes leading to a split lock since it can cause measurable performance issues and even possible unprivileged denial of service.

Building off that in the middle of summer was then proposed bus lock detection. It's been a few months since then but the bus lock detection for the kernel continues to be worked on and a new version of the proposed patches were sent out this week by Intel's Fenghua Yu.

A bus lock as happens via split locked access to writeback memory or using locks to uncacheable memory. A bus lock can lead to performance more than one thousand cycles slower than an atomic operation within a cache line and will disrupt performance on other cores.

Newer Intel CPUs have the ability to notify the kernel when a user instruction acquires a bus lock. The updated Linux kernel patches make use of that for offering bus lock detection and building off the kernel's existing split lock detection.

The behavior with the proposed work is still controlled via the split_lock_detect= kernel parameter where the user can be warned over a split or bus lock or setting it to "fatal" if wanting to send a SIGBUS to the user over a split lock or bus lock. The default behavior is just warning the user.

There are the v3 RFC patches for those interested in testing this bus lock detection support for Linux. The earliest now we could see this work mainlined is Linux 5.11 but given the lengthy period between the patch series thus far there doesn't seem to be much eagerness to get this merged as soon as possible.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week