News for hackers. Stuff that matters.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by kaba0 on Friday September 17, 2021 @07:42PM (#28572117)
Though many part of compaction can be moved to a parallel thread, can’t it? The actual stop-the-world time can be quite small that way (using read-barriers though)
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by throwaway894345 on Friday September 17, 2021 @08:27PM (#28572397)
I’m not so sure about barriers, but compacting requires rewriting pointers that are shared with the mutator threads, so it seems hard to parallelize.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by kaba0 on Saturday September 18, 2021 @12:13PM (#28577283)
As far as I know, this is the “secret” of ZGC at least, it replaces the usual write barriers with read ones. So a parallel thread is free to move an object to a new place, and any thread trying to access it will at that point lock said object. This will have a performance impact (the usual write barriers have better throughput because they only “lock” when writing an object), but more of the GC can be parallelized.

But I’m by no means anywhere close to an expert in the topic.

Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by throwaway894345 on Saturday September 18, 2021 @01:09PM (#28577695)
Interesting. What about an application thread (“mutator” in GC parlance) that tries to write to the pointer? Does that hit the read barrier as well? Does this imply worse application throughout to improve GC metrics? If so, I wonder how much worse? (Not asking you per se, but wondering aloud)