RFR: Delayed heap regions uncommit

Aleksey Shipilev shade at redhat.com
Mon Aug 7 20:32:06 UTC 2017


Hi,

This is the implementation for delayed heap regions uncommit, which is the third [1] major step for
a "resizeable" heap for Shenandoah:
  http://cr.openjdk.java.net/~shade/shenandoah/region-uncommit/webrev.04/

It works on per-region level, keeping the status of an individual region as active, recycled, or
uncommitted. Once region stays recycled for too long, the asynchronous task would attempt to
uncommit it. This "delayed" uncommit guarantees that actively used regions (and actively used heap,
for that matter), does not get uncommitted. All allocation paths have to check and bring region to
active, before attempting allocation.

Current delay timer is set to 5 minutes, and it gets effectively disabled with -XX:+AlwaysPreTouch.
Related improvements: track real "committed" size, and report it everywhere, including JMX; make
Verifier assert that objects never get into non-active regions.

Sample footprint figures:
  http://cr.openjdk.java.net/~shade/shenandoah/region-uncommit/webrev-04-footprint.png

Testing: hotspot_gc_shenandoah (+ new tests)

Thanks,
-Aleksey

[1] The first one was actually adding regions under allocation pressure, the code is already there
for years; the second was periodic GC



More information about the shenandoah-dev mailing list