paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Bounding Speculative Execution of Atomic Regions to a Single Retry

将原子区域的推测执行限制为单次重试
ASPLOS Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 42024匹配度 0/10 · 该论文研究并发程序中的推测执行、cacheline 锁与硬件事务内存优化,属于体系结构/并发控制方向,与用户关注的静态分析、LLM/Agent、浮点程序分析、贝叶斯程序分析均无交集。引用 0 inbox
Eduardo José Gómez-Hernández, Juan M. Cebrian, Stefanos Kaxiras, Alberto Ros
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 cleAR,用 cacheline 锁将有冲突的原子区域推测执行限制为单次重试,降低回退与执行时间。

互斥是并行编程的基本构造,但锁操作在很大程度上主导并行程序性能。Speculative Lock Elision 与硬件事务内存允许原子区域并发推测执行,并通过冲突检测保证正确性;然而实际实现是尽力而为的,冲突后需重试预定次数,再回退到互斥。本文提出 cleAR:若原子区域在重执行时访问完全相同的地址集合,可在首次执行中学习该集合,并在下一次通过有序 cacheline locking 非推测执行,从而把推测执行限制为单次重试。该方法在首次 abort 时强制重执行进入 cacheline 锁定模式,且检测与转换对软件透明。基于 gem5、数据结构基准与 STAMP 的评估显示,首次重试成功比例从 35.4% 升至 64.4%,回退执行从 37.2% 降至 15.4%,平均执行时间较基线降低 35.0%,较 PowerTM 降低 23.3%。

问题
并行程序中互斥锁开销大,而基于推测锁消除或硬件事务内存的原子区域执行是尽力而为的,冲突后需多次重试甚至回退到粗粒度互斥。
方法
利用 cacheline locking,在原子区域首次 abort 后强制其重执行进入 cacheline 锁定模式;若重执行访问相同地址集合,则进行有序 cacheline 锁定而非推测执行,该检测与转换对软件透明。
评估
在 gem5 上运行数据结构基准与 STAMP 基准套件,比较首次重试成功率、回退比例和平均执行时间,并与基线配置及 PowerTM 等方法对比。
原文摘要(Abstract)

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 re-execution to use cacheline locking. The detection and conversion to cacheline-locking mode is transparent to software. Using gem5 running data-structure benchmarks and the STAMP benchmark suite, we show that the average number of ARs that succeed on the first retry grows from 35.4% in our baseline to 64.4% with cleAR, reducing the percentage of fallback (coarse-grain mutual exclusion) execution from 37.2% to 15.4%. These improvements reduce average execution time by 35.0% over a baseline configuration and by 23.3% over more elaborated approaches like PowerTM.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{Gomez-Hernandez24,
  title = {Bounding Speculative Execution of Atomic Regions to a Single Retry},
  author = {Eduardo José Gómez-Hernández and Juan M. Cebrian and Stefanos Kaxiras and Alberto Ros},
  booktitle = {ASPLOS},
  year = {2024},
  doi = {10.1145/3622781.3674176}
}