Verifying and Optimizing Compact NUMA-Aware Locks on Weak Memory Models
Antonio Paolillo, Hern\'an Ponce-de-Le\'on, Thomas Haas, Diogo, Behrens, Rafael Chehab, Ming Fu, Roland Meyer

TL;DR
This paper verifies the correctness and optimizes the implementation of compact NUMA-aware locks on modern weak memory architectures, revealing discrepancies in Linux's lock implementations across different memory models.
Contribution
It provides a detailed verification of the CNA lock algorithm on WMMs and identifies necessary barriers, also analyzing Linux qspinlock's correctness on various architectures.
Findings
Linux qspinlock is incorrect under LKMM but correct on ARMv8 and Power.
Proper barriers are crucial for correctness on WMMs.
The paper offers optimized barrier placement for CNA locks.
Abstract
Developing concurrent software is challenging, especially if it has to run on modern architectures with Weak Memory Models (WMMs) such as ARMv8, Power, or RISC-V. For the sake of performance, WMMs allow hardware and compilers to aggressively reorder memory accesses. To guarantee correctness, developers have to carefully place memory barriers in the code to enforce ordering among critical memory operations. While WMM architectures are growing in popularity, identifying the necessary and sufficient barriers of complex synchronization primitives is notoriously difficult. Unfortunately, publications often consider barriers to be just implementation details and omit them. In this technical note, we report our efforts in verifying the correctness of the Compact NUMA-Aware (CNA) lock algorithm on WMMs. The CNA lock is of special interest because it has been proposed as a new slowpath for…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsDistributed systems and fault tolerance · Parallel Computing and Optimization Techniques · Security and Verification in Computing
