RFR: 8268163: Change the order of fallback full GCs in G1

Stefan Johansson sjohanss at openjdk.java.net
Tue Jun 8 15:09:17 UTC 2021


On Tue, 8 Jun 2021 14:50:20 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> This is currently the only case where we need separate arguments for the two. So previously the "upgraded" Full collections used `clear_all_soft_refs == true` and `do_maximum_compaction == false`, so I kept it that way. In some sense I think this is fine, when upgrading this is the first time we try a Full GC so leaving dead wood (`maximum==false`) could still find some space. It is only when we attempt a second Full collection in a row we set `do_maximum_compaction == true`. Makes sense, or do you think we should force a "maximum compaction" when upgrading?
>
> Fwiw, I am good with either, i.e. do a maximally compacting gc or not; both will likely free some space but the non-maximally compacting should be faster. Maybe this change should just remove the third full gc, and in a separate change think about the upgrade policy. I already filed https://bugs.openjdk.java.net/browse/JDK-8268393 for such work.

At least with this change we will never do 3 consecutive Full GCs in the same VM operation.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4342



More information about the hotspot-gc-dev mailing list