RFR: 8315686: G1: Disallow evacuation of marking regions in a Prepare Mixed gc

Albert Mingkun Yang ayang at openjdk.org
Thu Sep 7 11:42:38 UTC 2023


On Thu, 7 Sep 2023 08:17:21 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
>   can I have reviews for this change that disables "Prepare Mixed" GCs (opportunistically) taking collection set candidates from marking into their collection set?
> The problem when doing so is related to pause time predictions:
> * Prepare Mixed young gen prediction did never take (marking) old gen regions into account in the first place, potentially blowing MMU (that there is a minimum regions to take per GC does not help)
> * another problem is how to account this "half-young-only" in the predictions: what kind of predictions to take here, the ones for young-only gcs or mixed gcs? What predictions to update for this kind of GC?
> * a third problem is adaptive IHOP: there are cases where that "Prepare Mixed" gc would take all marking collection set candidates, which means that the adaptive IHOP algorithm may never get a full "Concurrent Start" to first "Mixed GC" cycle, leading to IHOP not being changed dynamically.
> * another problem related to "Prepare Mixed" gc taking all marking collection set candidates is that the next Mixed GC will be somewhat degenerate, having no old gen regions to collect, impacting mixed phase predictions as well.
> 
> For all these reasons it is best to disable Prepare Mixed GC taking marking collection set candidates.
> 
> Testing: gha, manual behavior checking
> 
> Thanks,
>   Thomas

src/hotspot/share/gc/g1/g1CollectionSet.cpp line 329:

> 327:     assert(_optional_old_regions.length() == 0, "must be");
> 328: 
> 329:     if (!collector_state()->in_young_gc_before_mixed()) {

Could this be affirmative, sth like `in_mixed_phase`?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15611#discussion_r1318480459


More information about the hotspot-gc-dev mailing list