RFR: 8277736: G1: Configure the distribution of objects failing evacuation among regions

Hamlin Li mli at openjdk.java.net
Fri Nov 26 02:38:07 UTC 2021


On Thu, 25 Nov 2021 19:24:03 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Currently, debug options of evacuation failure, like G1EvacuationFailureALotInterval and G1EvacuationFailureALotCount only config the ratio of objects failing evacuation, basically the distribution of objects failing evacuation is even among regions.
>> 
>> JDK-8256265 is trying to improve parallelism in regions that failed evacuation, it'll be helpful if there is option to config the distribution of objects failing evacuation among regions, so implementation of JDK-8256265 could be profiled more precisely.
>> 
>> This is to add the support and necessary vm options, and the implementation will be to select regions from start, i.e. not randomly, the motivation is to configure a more stable selection of evacuation failure regions, which will help verify the effect of JDK-8256265 implementation.
>
> src/hotspot/share/gc/g1/g1YoungGCEvacFailureInjector.cpp line 47:
> 
>> 45:       _regions.set_bit(r->hrm_index());
>> 46:       --_evac_failure_regions_num;
>> 47:       return false;
> 
> Just an initial comment to think about and discuss: This would most likely always ever select the same regions (probably eden) that are first in the collection set.
> I think selecting by probability (with G1EvacuationFailureALotCSetPercent uniform probability) would be more interesting even if it makes the selection more random.

Yes, currently I only make it select regions starting from first.
The reason I don't add random selection is that, currently we need this functionality to verify the functionality and perf improvement of JDK-8256265 implementation, so a more stable selection of evacuation failure regions will help to verify the effect of JDK-8256265.

I agree that random selection is an interesting option to supply too, I just file https://bugs.openjdk.java.net/browse/JDK-8277851 to track the issue.

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

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



More information about the hotspot-gc-dev mailing list