Turning manual concurrent memory reclamation into automatic reference counting
摘要
Safe memory reclamation (SMR) schemes are an essential tool for lock-free data structures and concurrent programming. However, manual SMR schemes are notoriously difficult to apply correctly, and automatic schemes, such as reference counting, have been argued for over a decade to be too slow for practical purposes. A recent wave of work has disproved this long-held notion and shown that reference counting can be as scalable as hazard pointers, one of the most common manual techniques. Despite these tremendous improvements, there remains a gap of up to 2x or more in performance between these schemes and faster manual techniques such as epoch-based reclamation (EBR).
In this work, we first advance these ideas and show that in many cases, automatic reference counting can in fact be as fast as the fastest manual SMR techniques. We generalize our previous Concurrent Deferred Reference Counting (CDRC) algorithm to obtain a method for converting any standard manual SMR technique into an automatic reference counting technique with a similar performance profile. Our second contribution is extending this framework to support weak pointers, which are reference-counted pointers that automatically break pointer cycles by not contributing to the reference count, thus addressing a common weakness in reference-counted garbage collection.
Our experiments with a C++-library implementation show that our automatic techniques perform in line with their manual counterparts, and that our weak pointer implementation outperforms the best known atomic weak pointer library by up to an order of magnitude on high thread counts. All together, we show that the ease of use of automatic memory management can be achieved without significant cost to practical performance or general applicability.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures 引用了 A Family of Fast and Memory Efficient Lock- and Wait-Free Reclamation
- Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures 引用了 Concurrent deferred reference counting with constant-time overhead
- Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures 引用了 Universal wait-free memory reclamation
- Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures 引用了 OrcGC: automatic lock-free memory reclamation
- Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data Structures 引用了 Are Your Epochs Too Epic? Batch Free Can Be Harmful
- A Family of Fast and Memory Efficient Lock- and Wait-Free Reclamation 引用了 Concurrent deferred reference counting with constant-time overhead
- A Family of Fast and Memory Efficient Lock- and Wait-Free Reclamation 引用了 Universal wait-free memory reclamation
- A Family of Fast and Memory Efficient Lock- and Wait-Free Reclamation 引用了 OrcGC: automatic lock-free memory reclamation
- A Family of Fast and Memory Efficient Lock- and Wait-Free Reclamation 引用了 Snapshot-free, transparent, and robust memory reclamation for lock-free data structures
- Concurrent Immediate Reference Counting 引用了 Concurrent deferred reference counting with constant-time overhead
- Concurrent Immediate Reference Counting 引用了 OrcGC: automatic lock-free memory reclamation
- Concurrent Immediate Reference Counting 引用了 Snapshot-free, transparent, and robust memory reclamation for lock-free data structures
- Concurrent deferred reference counting with constant-time overhead 引用了 NVTraverse: in NVRAM data structures, the destination is more important than the journey
- Concurrent deferred reference counting with constant-time overhead 引用了 Universal wait-free memory reclamation
- Concurrent deferred reference counting with constant-time overhead 引用了 OrcGC: automatic lock-free memory reclamation
- OrcGC: automatic lock-free memory reclamation 引用了 Universal wait-free memory reclamation
- Are Your Epochs Too Epic? Batch Free Can Be Harmful 引用了 Concurrent deferred reference counting with constant-time overhead
- Are Your Epochs Too Epic? Batch Free Can Be Harmful 引用了 Universal wait-free memory reclamation
- Are Your Epochs Too Epic? Batch Free Can Be Harmful 引用了 OrcGC: automatic lock-free memory reclamation
- Snapshot-free, transparent, and robust memory reclamation for lock-free data structures 引用了 Universal wait-free memory reclamation
- Snapshot-free, transparent, and robust memory reclamation for lock-free data structures 引用了 OrcGC: automatic lock-free memory reclamation
- Leveraging Immutability to Validate Hazard Pointers for Optimistic Traversals 引用了 A Family of Fast and Memory Efficient Lock- and Wait-Free Reclamation
- Leveraging Immutability to Validate Hazard Pointers for Optimistic Traversals 引用了 Concurrent Immediate Reference Counting
- Leveraging Immutability to Validate Hazard Pointers for Optimistic Traversals 引用了 Concurrent deferred reference counting with constant-time overhead
- Leveraging Immutability to Validate Hazard Pointers for Optimistic Traversals 引用了 Universal wait-free memory reclamation
- Leveraging Immutability to Validate Hazard Pointers for Optimistic Traversals 引用了 Snapshot-free, transparent, and robust memory reclamation for lock-free data structures
引用它的顶会 Paper6
- A Family of Fast and Memory Efficient Lock- and Wait-Free ReclamationRuslan Nikolaev, Binoy RavindranPLDI 2024 · 7 次引用
- Concurrent Immediate Reference CountingJaehwang Jung, Jeonghyeon Kim, Matthew J. Parkinson, Jeehoon KangPLDI 2024 · 6 次引用
- Are Your Epochs Too Epic? Batch Free Can Be HarmfulDaewoo Kim, Trevor Brown, Ajay SinghPPoPP 2024 · 5 次引用
- Publish on Ping: A Better Way to Publish Reservations in Memory Reclamation for Concurrent Data StructuresAjay Singh, Trevor BrownPPoPP 2025 · 3 次引用
- Leveraging Immutability to Validate Hazard Pointers for Optimistic TraversalsJanggun Lee, Jeonghyeon Kim, Jeehoon KangPLDI 2025 · 2 次引用
它引用的 Paper5
- NVTraverse: in NVRAM data structures, the destination is more important than the journeyMichal Friedman, Naama Ben-David, Yuanhao Wei, Guy E. Blelloch 等PLDI 2020 · 52 次引用
- Concurrent deferred reference counting with constant-time overheadDaniel Anderson, Guy E. Blelloch, Yuanhao WeiPLDI 2021 · 26 次引用
- Universal wait-free memory reclamationRuslan Nikolaev, Binoy RavindranPPoPP 2020 · 23 次引用
- OrcGC: automatic lock-free memory reclamationAndreia Correia, Pedro Ramalhete, Pascal FelberPPoPP 2021 · 19 次引用
- Snapshot-free, transparent, and robust memory reclamation for lock-free data structuresRuslan Nikolaev, Binoy RavindranPLDI 2021 · 18 次引用
相关 Paper
- NBR: neutralization based reclamationAjay Singh, Trevor Brown, Ali José MashtizadehPPoPP 2021 · 23 次引用
- RRR-SMR: Reduce, Reuse, Recycle: Better Methods for Practical Lock-Free Data StructuresMd Amit Hasan Arovi, Ruslan NikolaevPLDI 2025 · 2 次引用
- Fixing Non-blocking Data Structures for Better Compatibility with Memory Reclamation SchemesMd Amit Hasan Arovi, Ruslan NikolaevPPoPP 2026 · 1 次引用
- A marriage of pointer- and epoch-based reclamationJeehoon Kang, Jaehwang JungPLDI 2020 · 25 次引用
- Pointer life cycle types for lock-free data structures with memory reclamationRoland Meyer, Sebastian WolffPOPL 2020 · 7 次引用
