裂变锁
Fissile Locks
摘要:
经典的测试和测试(TS)互斥锁很简单,并且在轻微或无争用的情况下享有高性能和所有权转移的低延迟。然而,它们在高争用下不能优雅地扩展,并且不提供任何准入顺序保证。这种担忧导致了可扩展的基于锁的锁的开发,例如最近的Compact NUMA感知(CNA)锁,另一种流行的基于锁的MCS锁的变体。CNA在负载下扩展良好,并提供一定的准入保证,但具有比TS更复杂的锁定切换操作,并在低争用时产生更高的延迟。我们建议裂变锁,捕获TS和CNA最理想的属性。一个Fissile锁由两个底层锁组成:一个TS锁,作为快速路径;一个CNA锁,作为慢速路径。Fissile锁的关键特性是快速路径上的线程能够绕过慢速路径上排队的线程,并以比CNA更少的开销获得锁。旁路是有界的(通过一个可调参数),以避免饥饿和确保长期公平。结果是一个高度可扩展的NUMA感知锁,具有进度保证,在低争用时像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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。