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

Stefan Johansson sjohanss at openjdk.java.net
Fri Mar 26 10:44:27 UTC 2021


On Fri, 26 Mar 2021 09:47:13 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp line 83:
>> 
>>> 81:   // Reset data structures not valid after Full GC.
>>> 82:   reset_region_metadata(hr);
>>> 83:   _collector->update_attribute_table(hr, force_pinned);
>> 
>> @tschatzl, this call was here since before (but without the force part). Why is it needed? The call to `update_attribute_table()` will return straight away if the region has been free and to me it looks like that is the only change that can have occurred at this point. If it is not needed for other reasons, instead of adding the `force_pinned` part we could just add a `set_pinned()` helper to the `G1FullCollector` to make it more clear what is happening.
>
> in G1ResetPinnedClosure,  we need to skip freed humongous regions which depends on the info in attribute table. But if we don't update the corresponding table entry for freed humongous regions, these regions will invoke reset_pinned_after_full_gc(), seems it's wrong.

Yes, and previously this has been done by checking `r->is_pinned()` so it didn't use the information from the attribute table and you are correct that now when using it we need to make sure freed humongous are skipped. To me it looks like they would not be skipped right now. Will start some testing to see if we can trigger this.

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

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



More information about the hotspot-gc-dev mailing list