Lune

OOPSLA2025顶会

Work Packets: A New Abstraction for GC Software Engineering, Optimization, and Innovation

Wenyu Zhao, Stephen M. Blackburn, Kathryn S. McKinley

摘要

Garbage collection (GC) implementations must meet efficiency and maintainability requirements, which are often perceived to be at odds. Moreover, the desire for efficiency typically sacrifices agility, undermining rapid development and innovation, with unintended consequences on longer-term performance aspirations. Prior GC implementations struggle to: i) maximize efficiency, parallelism, and hardware utilization, while ii) correctly and elegantly implementing optimizations and scheduling constraints. This struggle is reflected in today's implementations, which tend to be monolithic and depend on coarse phase-based synchronization.

This paper presents a new design for GC implementations that emphasizes both agility and efficiency. The design simplifies and unifies all GC tasks into work packets which define: i) work items, ii) kernels that process them, and iii) scheduling constraints. Our simple insights are that execution is dominated by a few very small, heavily executed kernels, and that GC implementations are high-level algorithms that orchestrate vast numbers of performance-critical work items. Work packets comprise groups of like work items, such as the scanning of a thread's stack or the tracing of a single object in a multi-million object heap. The kernel attached to a packet specifies how to process items within the packet, such as how to scan a stack, or how to trace an object. The scheduling constraints express dependencies, e.g. all mutators must stop before copying any objects. Fully parallel activities, such as scanning roots and performing a transitive closure, proceed with little synchronization. The implementation of a GC algorithm reduces to declaring required work packets, their kernels, and dependencies. The execution model operates transparently of GC algorithms and work packet type. We broaden the scope of work-stealing, applying it to any type of GC work and introduce a novel two-tier work-stealing algorithm to further optimize parallelism at fine granularity.

We show the software engineering benefits of this design via eight collectors that use 23 common work packet types in the MMTk GC framework. We use the LXR collector to show that the work packet abstraction supports innovation and high performance: i) comparing versions of LXR, work packets deliver performance benefits over a phase-based approach, and ii) LXR with work packets outperforms the highly-tuned latest (OpenJDK 24), state-of-the-art G1 garbage collector. We thus demonstrate that work packets achieve high performance, while simplifying GC implementation, making them inherently easier to optimize and verify.

问 Lune

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

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

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Iso: Request-Private Garbage Collection 引用了 Rethinking Java Performance Analysis
  • Iso: Request-Private Garbage Collection 引用了 Low-latency, high-throughput garbage collection
  • Advancing Performance via a Systematic Application of Research and Industrial Best Practice 引用了 Rethinking Java Performance Analysis
  • Advancing Performance via a Systematic Application of Research and Industrial Best Practice 引用了 Low-latency, high-throughput garbage collection
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper4

  1. Low-latency, high-throughput garbage collectionWenyu Zhao, Stephen M. Blackburn, Kathryn S. McKinleyPLDI 2022 · 24 次引用
  2. Rethinking Java Performance AnalysisStephen M. Blackburn, Zixian Cai, Rui Chen, Xi Yang 等ASPLOS 2025 · 19 次引用
  3. Iso: Request-Private Garbage CollectionTianle Qiu, Stephen M. BlackburnPLDI 2025 · 1 次引用
  4. Advancing Performance via a Systematic Application of Research and Industrial Best PracticeWenyu Zhao, Stephen M. Blackburn, Kathryn S. McKinley, Man Cao 等OOPSLA 2025

相关 Paper

  1. BWoS: Formally Verified Block-based Work Stealing for Parallel ProcessingJiawei Wang, Bohdan Trach, Ming Fu, Diogo Behrens 等OSDI 2023 · 5 次引用
  2. Jade: A High-throughput Concurrent Copying Garbage CollectorMingyu Wu, Liang Mao, Yude Lin, Yifeng Jin 等EuroSys 2024 · 5 次引用
  3. Uncovering Hidden Memory Costs for Garbage CollectionSudhanshu Agarwal, Saugata GhoseOOPSLA 2026
  4. Mark-Scavenge: Waiting for Trash to Take Itself OutJonas Norlinder, Erik Österlund, David Black-Schaffer, Tobias WrigstadOOPSLA 2024
  5. Evaluating Garbage Collection Performance Across Managed Language RuntimesYicheng Wang, Wensheng Dou, Yu Liang, Yi Wang 等ICSE 2025 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖