论文标题

裂变锁

Fissile Locks

论文作者

Dice, Dave, Kogan, Alex

论文摘要

经典测试(TS)相互排除锁很简单,在光线或没有争议下享受高性能和所有权转让的低潜伏期。但是,他们在高度争夺中没有优雅地扩展,也不提供任何入学令。这种担忧导致了可扩展队列的锁的发展,例如最近的紧凑型Numa-Aware(CNA)锁,这是另一个流行的基于队列的MCS锁的变体。 CNA在负载下良好的尺度,并提供了一定的入院保证金,但是比TS比TS更复杂的锁切换操作,并且在低竞争时会产生更高的潜伏期。我们提出了裂变锁,该锁捕获了TS和CNA的最理想的特性。裂变锁由两个下面的锁组成:TS锁,它是快速路径,而CNA锁可以用作缓慢的路径。裂变锁的关键特征是螺纹在快速路径上绕过在慢速路径上加入的线程的能力,并以比CNA少的开销获取锁。旁路是有限的(通过可调参数),以避免饥饿并确保长期公平。结果是一个高度可扩展的数字感知锁,并保证在低竞争时表现出像TS一样的表现,并且在高竞争中表现为CNA。

Classic test-and-test (TS) mutual exclusion locks are simple, and enjoy high performance and low latency of ownership transfer under light or no contention. However, they do not scale gracefully under high contention and do not provide any admission order guarantees. Such concerns led to the development of scalable queue-based locks, such as a recent Compact NUMA-aware (CNA) lock, a variant of another popular queue-based MCS lock. CNA scales well under load and provides certain admission guarantees, but has more complicated lock handover operations than TS and incurs higher latencies at low contention. We propose Fissile locks, which capture the most desirable properties of both TS and CNA. A Fissile lock consists of two underlying locks: a TS lock, which serves as a fast path, and a CNA lock, which serves as a slow path. The key feature of Fissile locks is the ability of threads on the fast path to bypass threads enqueued on the slow path, and acquire the lock with less overhead than CNA. Bypass is bounded (by a tunable parameter) to avoid starvation and ensure long-term fairness. The result is a highly scalable NUMA-aware lock with progress guarantees that performs like TS at low contention and like CNA at high contention.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源