RFR (S) 8241139: Shenandoah: distribute mark-compact work exactly to minimize fragmentation

Aleksey Shipilev shade at redhat.com
Thu Mar 19 12:21:36 UTC 2020


RFE:
  https://bugs.openjdk.java.net/browse/JDK-8241139

Was following up on why JLinkTest fails with Shenandoah. Figured out the dynamic work distribution
in mark-compact leaves alive regions in the middle of the heap. It is a generic problem with current
mark-compact implementation, as which regions get into each worker slice is time-dependent.

Consider the worst case scenario: two workers would have their slices interleaved, once slice is
fully alive, and other is fully dead. In the end, mark-compact would finish with the same
interleaved heap. A humongous allocation then fails. We need to plan the parallel sliding more
accurately. See the code comments about what new plan does.

Webrev:
  https://cr.openjdk.java.net/~shade/8241139/webrev.01/

Testing: hotspot_gc_shenandoah; known-failing test; tier{1,2,3} (passed with previous version,
running with new version now); eyeballing shenandoah-visualizer

-- 
Thanks,
-Aleksey




More information about the hotspot-gc-dev mailing list