RFR: 8327000: GenShen: Integrate updated Shenandoah implementation of FreeSet into GenShen [v27]

Kelvin Nilsen kdnilsen at openjdk.org
Tue Jun 25 22:11:25 UTC 2024


On Tue, 25 Jun 2024 20:49:25 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Improve consistency of OOM in GenShen mode
>>   
>>   Treat any full GC that enables a previously blocked allocation as good
>>   progress.
>
> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 1032:
> 
>> 1030:         result = allocate_memory_under_lock(req, in_new_region);
>> 1031:       }
>> 1032:       if ((result != nullptr) && mode()->is_generational()) {
> 
> I am wondering why we are using a `mode()->is_generational()` filter here.
> 
> Would this not work in exactly the same way for the non-generational case as well?
> 
> If so, I'd extract this fix out more generally and upstream it separately as its own ticket for fixing the OOM'ing behavior for "no progress OOMs".

This would work "equally well" for non-generational mode.  I was reluctant to "change the behavior" of non-gen mode, especially because the problem we're facing seems to only manifest in generational mode.

I don't think it would hurt non-gen mode at all.  But perhaps some rare actual customer of non-gen might actually be counting on the existing behavior...  (?)

> src/hotspot/share/gc/shenandoah/shenandoahMmuTracker.cpp line 129:
> 
>> 127:   double now = os::elapsedTime();
>> 128:   double duration = now - _most_recent_timestamp;
>> 129: 
> 
> Is this change just to remove spurious differences from upstream openjdk/jdk repo?

I had inserted and then removed some debugging instrumentation here.  I will restore the blank lines to "original" form.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/440#discussion_r1653631654
PR Review Comment: https://git.openjdk.org/shenandoah/pull/440#discussion_r1653632523


More information about the shenandoah-dev mailing list