RFR: 8316632: Shenandoah: Raise OOME when gc threshold is exceeded
Y. Srinivas Ramakrishna
ysr at openjdk.org
Sat Sep 23 01:50:23 UTC 2023
On Thu, 21 Sep 2023 22:08:32 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 947:
>>
>>> 945: control_thread()->handle_alloc_failure(req, false);
>>> 946: notify_gc_progress();
>>> 947: *gc_overhead_limit_was_exceeded = true;
>>
>> I am confused. We have noted that we did more than `ShenandoahNoProgressThreshold` collections at this point. So we will fail the allocation request, set `gc_overhead_limit_was_exceeded`, and return `null` to the requester.
>>
>> What happens at the caller, in response to this set of conditions?
>>
>> Why then does it make sense to `notify_gc_progress()`, which clears the counter of `_gc_no_progress_count`? Where was the ostensible progress in this case?
>
> Ultimately, the caller will have an OOME raised. The `_gc_no_progress_count` is cleared to allow subsequent mutator allocations to resume the slower block-and-retry loop in `ShenandoahHeap::allocate_memory`.
OK, thanks, that makes sense. Can you add a comment line to that effect?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15852#discussion_r1334903081
More information about the shenandoah-dev
mailing list