RFR (S): 8154528: Reclaim regions emptied by marking in Remark pause

Aleksey Shipilev shade at redhat.com
Mon Apr 16 11:29:54 UTC 2018

On 04/16/2018 01:13 PM, Thomas Schatzl wrote:
>> CR:
>> https://bugs.openjdk.java.net/browse/JDK-8154528
>> Webrev:
>> http://cr.openjdk.java.net/~tschatzl/8154528/webrev/

The patch looks good.

We do the similar thing in Shenandoah, it is surprisingly effective on many workloads. Although
Shenandoah does this by marking those regions as "trash" during the pause, and then concurrently
cleaning them up after leaving the pause, which saves a few milliseconds of pause time. It matters
in two non-obvious places: a) if you ZapUnusedHeapArea (enabled by default in fastdebug) during the
pause, many of time-sensitive bugs get hidden; b) test time gets larger, because we would spend much
more time in STW;

Another related idea that we implemented in Shenandoah is immediate-garbage shortcut: when we have
enough of these reclaimable regions (e.g. 95% of total garbage), we shortcut the cycle, wasting no
more cycles for collection. I think it is more beneficial for G1, because you can avoid going to STW
for evacuation.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20180416/e956f91e/signature.asc>

More information about the hotspot-gc-dev mailing list