Lune

ASPLOS2024顶会

Bounding Speculative Execution of Atomic Regions to a Single Retry

Eduardo José Gómez-Hernández, Juan M. Cebrian, Stefanos Kaxiras, Alberto Ros

摘要

Mutual exclusion has long served as a fundamental construct in parallel programs. Despite a long history of optimizing the lower-level lock and unlock operations used to enforce mutual exclusion, such operations largely dictate performance in parallel programs. Speculative Lock Elision, and more generally Hardware Transactional Memory, allow executing atomic regions (ARs) concurrently and speculatively, and ensure correctness by using conflict detection. However, practical implementations of these ideas are best-effort and, in case of conflicts, the execution of ARs is retried a predetermined number of times before falling back to mutual exclusion.

This work explores the opportunities of using cacheline locking to bound the number of retries of speculative solutions. Our key insight is that ARs that access exactly the same set of addresses when re-executing can learn that set in the first execution and execute non-speculatively in the next one by performing an ordered cacheline locking. This way the speculative execution is bounded to a single retry.

We first establish the conditions for ARs to be able to re-execute under a cacheline-locked mode. Based on these conditions, we propose cleAR, cacheline-locked executed AR, a novel technique that on the first abort, forces the reexecution to use cacheline locking. The detection and conversion to cacheline-locking mode is transparent to software.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Free atomics: hardware atomic operations without fences 引用了 Efficient, Distributed, and Non-Speculative Multi-Address Atomic Operations
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper4

  1. Free atomics: hardware atomic operations without fencesAshkan Asgharzadeh, Juan M. Cebrian, Arthur Perais, Stefanos Kaxiras 等ISCA 2022 · 13 次引用
  2. Lock-free locks revisitedNaama Ben-David, Guy E. Blelloch, Yuanhao WeiPPoPP 2022 · 12 次引用
  3. Efficient, Distributed, and Non-Speculative Multi-Address Atomic OperationsEduardo José Gómez-Hernández, Juan M. Cebrian, J. Rubén Titos Gil, Stefanos Kaxiras 等MICRO 2021 · 8 次引用
  4. TORTIS: Retry-Free Software Transactional Memory for Real-Time SystemsClaire Nord, Shai Caspin, Catherine E. Nemitz, Howard E. Shrobe 等RTSS 2021 · 2 次引用

相关 Paper

  1. Chaining Transactions for Effective Concurrency Management in Hardware Transactional MemoryVíctor Nicolás-Conesa, J. Rubén Titos Gil, Ricardo Fernández-Pascual, Manuel E. Acacio 等MICRO 2024 · 2 次引用
  2. No Rush in Executing Atomic InstructionsAshkan Asgharzadeh, Josué Feliu, Manuel E. Acacio, Stefanos Kaxiras 等HPCA 2025
  3. Towards Generating Thread-Safe Classes AutomaticallyHaichi Wang, Zan Wang, Jun Sun, Shuang Liu 等ASE 2020 · 1 次引用
  4. Improving the Concurrency Performance of Persistent Memory Transactions on MulticoresQing Wang, Youyou Lu, Zhongjie Wu, Fan Yang 等DAC 2020 · 3 次引用
  5. Reciprocating LocksDave Dice, Alex KoganPPoPP 2025 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖