RFR (S): Do more Full GC tries following the allocation failure

Aleksey Shipilev shade at redhat.com
Tue Dec 13 13:23:19 UTC 2016


Hi,

There is another interesting race after full GC: if there are many threads
alloc-failing and then requesting full GC, it might so happen that one of those
threads unblocks after full GC, tries to allocate only to find other threads
have claimed everything, fails, and that is OOME. While the better strategy
should be another full GC.

See the change and the comment:
  http://cr.openjdk.java.net/~shade/shenandoah/full-gc-retry/webrev.01/

Additionally, this gives us a tuning knob: with -XX:ShenandoahFullGCTries=0, we
say that we would rather fail with OOME than accept the Full GC.

Testing: hotspot_gc_shenandoah, gc-bench alloc tests (where it OOMEd before)

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list