paperbot · PL 论文追踪

全部论文 待读 收藏

P2 RRR-SMR: Reduce, Reuse, Recycle: Better Methods for Practical Lock-Free Data Structures

RRR-SMR:减少、重用、回收——实用无锁数据结构的更好方法
PLDI 9(PLDI)2025匹配度 2/10 · 该论文研究无锁数据结构的并发内存回收(SMR/ABA 问题),属于并发与运行时内存管理方向,与用户画像中的静态分析、LLM/Agent、浮点程序分析、贝叶斯程序分析均无直接交集。仅在“工程实现与系统落地”这一泛化偏好上略有共鸣,但问题域完全不同。引用 2 inbox
Md Amit Hasan Arovi, Ruslan Nikolaev
crossref: 2026-09-10

AI 速览

一句话:提出 RRR 通用方法,使 SMR 下的无锁数据结构能安全重用与移动节点而无需重新分配,并给出 Michael-Scott 队列的高效特化实现。

并发数据结构通常依赖安全内存回收(SMR,如 EBR、HP)管理内存,而 SMR 下新增元素必须重新分配对象。但复杂场景中同一对象常需在多个数据结构间无拷贝移动(如节点从链表移到另一链表再移回),这在 SMR 下通常不可行:ABA 问题使同一指针在未经历完整 SMR 周期后重现;且链表、跳表、哈希表、树等采用非平凡遍历与两阶段删除,逻辑删除的对象可能仍被其他线程访问。本文提出构建 RRR(Reduce、Reuse、Recycle)数据结构的通用方法,在 SMR 下安全地重用与回收内存,适用于链表、跳表、哈希表、Natarajan-Mittal 树等,并给出 Michael-Scott 队列的高效特化版本。x86-64 上对多种结构与 SMR 方案的评估显示良好前景。

问题
在 SMR 机制下,同一对象需在多个数据结构之间无拷贝地移动时,会同时面临 ABA 问题(指针原地重现)以及两阶段删除结构中逻辑删除对象仍可能被其他线程访问的困难,导致安全的内存重用与回收通常不可行。
方法
提出构建 RRR(Reduce、Reuse、Recycle)数据结构的通用方法,使 SMR 下可以安全地重用和回收节点,适用于链表、跳表、哈希表、Natarajan-Mittal 树等结构,并给出 Michael-Scott 队列的更高效特化回收版本。
评估
在 x86-64 平台上,针对多种数据结构与多种 SMR 方案进行实验评估,结果显示所提方法取得了有前景的性能表现。
原文摘要(Abstract)

Traditionally, most concurrent algorithms rely on safe memory reclamation (SMR)schemes for manual memory management. SMR schemes such as epoch-based reclamation (EBR) and hazard pointers (HP) are typically viewed as the only solution for memory recycling. When using SMR, a new object needs to be allocated whenever something new is added to a data structure. However, in more complex scenarios, the same object may need to be moved between different data structures (e.g., moving a node from one list to another, and then back to the original list) in a copy-free manner, i.e., without deallocating and allocating the node again. It is typically impossible for two reasons: (1) the ABA problem would still arise even when using SMR since the same pointer can reappear (without going through the full SMR cycle) if the same node eventually ends up back in the original data structure; (2) while in simple queues and stacks, nodes can immediately be recycled, it is unclear how to adapt data structures which use non-trivial traversal and two-phase deletion strategies, e.g., linked lists, skip lists, hash tables, trees, etc., where it is seemingly impossible to always immediately move (logically) deleted objects since they might still be accessed by other threads. We propose a general method of creating RRR (Reduce, Reuse, Recycle) data structures to allow safe memory recycling when using SMR which addresses the above-mentioned problems. Our method is applicable to linked lists, skip lists, hash tables, Natarajan-Mittal tree, and other data structures. We also discuss and propose a specialized approach – a more efficient version of Michael-and-Scott’s (recycling) queue. Our evaluation on x86-64 shows promising results when using our methods for different data structures and SMR schemes.

链接与引用

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

BibTeX
@article{paperbot3097,
  title = {RRR-SMR: Reduce, Reuse, Recycle: Better Methods for Practical Lock-Free Data Structures},
  author = {Md Amit Hasan Arovi and Ruslan Nikolaev},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {PLDI},
  year = {2025},
  doi = {10.1145/3729337}
}