RFR: 8308507: G1: GClocker induced GCs can starve threads requiring memory leading to OOME
Ivan Walulya
iwalulya at openjdk.org
Tue May 23 09:43:04 UTC 2023
On Tue, 23 May 2023 08:30:34 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> src/hotspot/share/gc/g1/g1ConcurrentMark.cpp line 1110:
>>
>>> 1108: if (hr->is_humongous()) {
>>> 1109: oop obj = cast_to_oop(hr->humongous_start_region()->bottom());
>>> 1110: if (G1CollectedHeap::is_obj_filler(obj)) { // Object allocated, but not well-formed
>>
>> Suggestion:
>>
>> if (G1CollectedHeap::is_obj_filler(obj)) { // Object allocated, but not well-formed.
>
> Just an idea: I think it would be nicer and more understandable if the code explicitly checked if the object is part of the stalled allocation requests instead of relying on it being a filler object.
> It is a bit ugly that we use filler objects to identify objects in construction here, given that "nobody should have a reference to it" (I see the need). It is somewhat okay since it's GC.
> Another option would be having dedicated "object-in-construction" objects, which is more work.
In the worst case, searching the satisfied allocation requests list might have performance implications. However, that is speculation for now, I haven't tried it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14077#discussion_r1201891679
More information about the hotspot-gc-dev
mailing list