paperbot · PL 论文追踪

全部论文 待读 收藏

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

Work Packets:一种面向 GC 软件工程、优化与创新的新抽象
OOPSLA 9(OOPSLA2)2025匹配度 0/10 · 论文主题是垃圾回收实现中的 Work Packet 抽象与两级工作窃取并行优化,属于运行时与内存管理/并发系统方向;与用户关注的静态分析、LLM/Agent 程序分析、浮点程序分析及贝叶斯程序分析没有直接交集。引用 3 inbox
Wenyu Zhao, Stephen M. Blackburn, Kathryn S. McKinley
crossref: 2026-09-10

AI 速览

一句话:提出 Work Packet 抽象统一 GC 任务、内核与调度约束,并以两级工作窃取提升并行与性能。

垃圾回收实现常需兼顾效率与可维护性,但现有实现多为单体式且依赖粗粒度阶段同步。本文提出 Work Packet 抽象,将 GC 任务统一为工作项、处理内核与调度约束三部分;执行模型对 GC 算法透明,并将工作窃取推广到任意 GC 工作,引入两级工作窃取以优化细粒度并行。在 MMTk 框架中,八种收集器复用 23 种公共 packet 类型,展示其软件工程收益;LXR 收集器实验表明,基于 packet 的实现性能优于阶段式方法,并超过 OpenJDK 24 中高度调优的 G1。

问题
GC 实现难以同时满足高效与可维护性:现有实现往往单体化,依赖粗粒度的阶段同步,限制了并行、硬件利用与快速创新。
方法
将 GC 任务统一为 work packet,每个 packet 包含工作项、处理内核与调度约束;执行模型透明,并把工作窃取推广到任意 GC 工作,提出两级工作窃取算法。
评估
在 MMTk 框架中用八种收集器与 23 种公共 packet 类型验证软件工程收益;以 LXR 收集器对比阶段式实现,并与 OpenJDK 24 中高度调优的 G1 进行性能比较。
原文摘要(Abstract)

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.

链接与引用

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

BibTeX
@article{paperbot3020,
  title = {Work Packets: A New Abstraction for GC Software Engineering, Optimization, and Innovation},
  author = {Wenyu Zhao and Stephen M. Blackburn and Kathryn S. McKinley},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {OOPSLA2},
  year = {2025},
  doi = {10.1145/3763139}
}