RFR: 8335126: Shenandoah: Improve OOM handling

Y. Srinivas Ramakrishna ysr at openjdk.org
Thu Jun 27 18:53:19 UTC 2024


On Wed, 26 Jun 2024 23:19:58 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 969:
>> 
>>> 967:       //           So the second thread experiences OOMError even through another GC would have reclaimed the memory it wanted
>>> 968:       //           to allocate.
>>> 969:       //        2. A GLOBAL GC won't necessarily reclaim all garbage.  Following a concurrent Generational GLOBAL GC, we may
>> 
>> Hmmm.  I let Generational concepts slip into this comment.  Maybe harmless.  Maybe inappropriate.  
>> Reviewers: feel free to ask that I remove this mention...
>
> I think this is OK for now because we expect to integrate generational shenandoah soon, but am fine with defering it to GenShen integration in the future if other reviewers feel that would be better.
> 
> One question I had was about the policy for the treatment/reclamation of soft references, and whether that changes and/or escalates to "clear all" upon reaching a "less than good progress" state prior to an OOM (reflecting the best efforts promise prior to OOM).

My soft ref clearing policy question above was cleared up in the code walkthrough today. We do clear all soft refs upon an allocation failure and therefore, _a fortiori_, before throwing an OOM.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19912#discussion_r1657661550


More information about the hotspot-gc-dev mailing list