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

Hamlin Li mli at openjdk.java.net
Thu Mar 18 14:25:42 UTC 2021


On Thu, 18 Mar 2021 12:39:54 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> The change should support `MarkSweepAlwaysCompactCount` (just adapt the threshold).
>> 
>> The "last ditch" collection should also fully compact, as well as probably a System.gc() call. I do not know the exact rules for the other collectors right now.
>> 
>> Please update the summary with these (and the earlier mentioned) requirements and approach.
>
> After a short look I think the only changes that are needed to get a region to be considered pinned in the g1 full gc is in `G1FullCollector::update_attribute_table()` to set these regions that are too full as "pinned" for that collection.
> 
> There are two places in `G1FullCollector` where that attribute table isn't used yet, but the code uses `HeapRegion::is_pinned()` directly (search for `r->is_pinned()` in the full gc files, I think both are located in `g1FullGCCompactTask.cpp`). These should be rerouted to that table I think.
> 
> After that change everything should basically be still working.
> 
> No guarantees though.

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.

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

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



More information about the hotspot-gc-dev mailing list