Intel Prepping Bus Lock Detection For Linux To Avoid This Performance Pitfall
Building off the recently mainlined Intel work on split lock detection, Intel engineers have now been extending that with bus lock detection support.
A bus lock as outlined within Intel's PRM happens via split locked access to writeback memory or using locks to uncacheable memory. Detecting bus locks is important due to performance penalties and possible denial of service implications.
Intel's Fenghua Yu summed up the performance implications as typically being more than one thousand cycles slower than an atomic operation within a cache line and disrupting the performance of other CPU cores as well.
Newer Intel CPUs can notify the kernel after an instruction acquires a bus lock and is executed. With the bus lock detection, the application could be throttled or have mitigations (e.g. stopping the application) and the kernel can warn of the event occurring.
The proposed bus lock detection patches make use of the existing split_lock_detect= kernel command line option for configuring the behavior from warning when such events occur, rate limiting, or fatal behavior.
The tentative "request for comments" patches with more information on this bus lock detection support can be found via this kernel mailing list thread.
A bus lock as outlined within Intel's PRM happens via split locked access to writeback memory or using locks to uncacheable memory. Detecting bus locks is important due to performance penalties and possible denial of service implications.
Intel's Fenghua Yu summed up the performance implications as typically being more than one thousand cycles slower than an atomic operation within a cache line and disrupting the performance of other CPU cores as well.
Newer Intel CPUs can notify the kernel after an instruction acquires a bus lock and is executed. With the bus lock detection, the application could be throttled or have mitigations (e.g. stopping the application) and the kernel can warn of the event occurring.
The proposed bus lock detection patches make use of the existing split_lock_detect= kernel command line option for configuring the behavior from warning when such events occur, rate limiting, or fatal behavior.
The tentative "request for comments" patches with more information on this bus lock detection support can be found via this kernel mailing list thread.
13 Comments