RFR: JDK-8262068: Improve G1 Full GC by skipping compaction for regions with high survival ratio [v8]

Hamlin Li mli at openjdk.java.net
Fri Mar 19 01:14:38 UTC 2021


On Thu, 18 Mar 2021 14:36:51 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Thanks for the suggestion, will try it.
>> For "last-ditch" issue, we plan to re-use some flag/logic in soft-ref, would like to hear your suggestion in advance if it's convenient for you.
>
> in `G1CollectedHeap::satisfy_failed_allocation` there is this comment:
> 
>      // Attempts to allocate followed by Full GC that will collect all soft references.
> 
> That would be the start of this "last-ditch" collection. At this point it may be possible to use the `clear_all_soft_references` as indication that we should be maximally compacting in that full gc. You would need to check if a full GC with that flag set to true is always a "maximally compacting collection" (there is one path with a comment indicating that this is intended). If that is the case (idk, I haven't looked all paths), then it would be appropriate to rename that parameter to something like `do_maximal_compaction` everywhere.
> 
> And pass that information, that this collection should ignore the "dead wood" into the `G1FullCollector`.
> 
> Otherwise I'd start with adding another truly maximally compacting full gc that also gets this info passed into it at the end of `G1CollectedHeap::satisfy_failed_allocation`.
> 
> This is only a general idea about this, no guarantees that I won't object to this later if that were implemented ;)

Thanks Thomas!

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

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



More information about the hotspot-gc-dev mailing list