Queue Spinlocks Coming For Linux 4.2 Kernel

Written by Michael Larabel in Linux Kernel on 22 June 2015 at 09:53 AM EDT. 2 Comments
LINUX KERNEL
Waiman Long of HP has been spearheading qspinlocks now for the past several months and with Linux 4.2 the queue spinlocks support will be merged.

Long explained the queue-based spinlock implementation, "The queue spinlock has slight better performance than the ticket spinlock in uncontended case. Its performance can be much better with moderate to heavy contention. This patch has the potential of improving the performance of all the workloads that have moderate to heavy spinlock contention. The queue spinlock is especially suitable for NUMA machines with at least 2 sockets, though noticeable performance benefit probably won't show up in machines with less than 4 sockets. The purpose of this patch set is not to solve any particular spinlock contention problems. Those need to be solved by refactoring the code to make more efficient use of the lock or finer granularity ones. The main purpose is to make the lock contention problems more tolerable until someone can spend the time and effort to fix them."

The qspinlock patches have undergone several revisions over the months and with Linux 4.2 will be enabled by default on x86 platforms as they are outperforming the ticket spinlocks for all categories. This work is coming via the locking changes and in addition to qspinlock is a pvqspinlock for para-virtualized queued spinlocks and qrwlock as queued rwlocks similar to qspinlocks.
Related News
About The Author
Michael Larabel

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, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week