RFR: 8335902: Parallel: Refactor VM_ParallelGCFailedAllocation and VM_ParallelGCSystemGC [v3]
Albert Mingkun Yang
ayang at openjdk.org
Fri Jul 12 09:56:51 UTC 2024
On Fri, 12 Jul 2024 01:22:28 GMT, Guoxiong Li <gli at openjdk.org> wrote:
>> src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp line 446:
>>
>>> 444: }
>>> 445: return result; // Could be null if we are out of space.
>>> 446: }
>>
>> I notice the method `PSOldGen::allocate` can expand the size of the old gen, but the method `PSYoungGen::allocate` can't expand the size of the young gen. It is similar to a bug [1] in Serial. Fortunately, the size of the young generation can be resized during Parallel GC if the option `UseAdaptiveSizePolicy` is `true`. When the `UseAdaptiveSizePolicy` is set to `false` manually by the user, I suspect it is a bug in Parallel because of the unexpanded young generation size.
>>
>> [1] https://bugs.openjdk.org/browse/JDK-8333386
>
> @albertnetymk Do you think whether we need to expand young generation during allocation (both Serial and Parallel)? In Serial, `UseAdaptiveSizePolicy` is not used, so it is indeed a bug in Serial (the young generation can't be resized and is always the initial size).
Due to the internal structure (eden/survivor) of young-gen, it's not super easy to expand young-gen during allocation like old-gen. Need a dedicated ticket to properly evaluate its cost/benefit.
> Serial (the young generation can't be resized and is always the initial size).
That sounds like a definite bug; at least young-gen should be resizable during young-gc/full-gc.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20077#discussion_r1675613933
More information about the hotspot-gc-dev
mailing list