Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: simplify mark termination and eliminate mark 2 #26903
The garbage collector currently uses a racy and complex algorithm to enter mark termination, which has wide-ranging consequences for the complexity of the mark termination implementation. I propose replacing it with a race-free distributed termination detection-like algorithm. This should open the door to several significant simplifications of the garbage collector algorithm.
The design doc can be viewed here.
The only unimplemented step of my original proposal is "Allow safe-points without preemption in dedicated workers". Working on that should probably be folded into a broader re-think of how we schedule and preempt workers.
The primary goal was eliminating mark 2, which is done.