RFR: 8312610: GenShen: Old generation available is unintentionally restricted by mutator's available memory [v2]

William Kemper wkemper at openjdk.org
Mon Jul 24 18:36:46 UTC 2023


On Mon, 24 Jul 2023 18:07:01 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> William Kemper has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Restore single-generation computation of "soft" available
>
> src/hotspot/share/gc/shenandoah/shenandoahGlobalGeneration.cpp line 65:
> 
>> 63: 
>> 64:   // Make sure the code below treats available without the soft tail.
>> 65:   size_t soft_tail = max_capacity() - soft_max_capacity();
> 
> Would it be useful to assert here that `max_capacity() >= soft_max_capacity()` ?

Yes, better than computing an underflowed valued.

> src/hotspot/share/gc/shenandoah/shenandoahYoungGeneration.cpp line 106:
> 
>> 104: }
>> 105: 
>> 106: size_t ShenandoahYoungGeneration::soft_available() const {
> 
> So for young gen, `available` and `soft_available` are synonymous?
> 
> Can one just invoke the other and avoid the code duplication?

No - this is a bug. Good catch!

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/301#discussion_r1272610689
PR Review Comment: https://git.openjdk.org/shenandoah/pull/301#discussion_r1272609279


More information about the shenandoah-dev mailing list