RFR: 8335902: Parallel: Refactor VM_ParallelGCFailedAllocation and VM_ParallelGCSystemGC [v3]

Guoxiong Li gli at openjdk.org
Fri Jul 12 01:24:58 UTC 2024


On Thu, 11 Jul 2024 15:40:01 GMT, Guoxiong Li <gli at openjdk.org> wrote:

>> Albert Mingkun Yang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>> 
>>  - review
>>  - Merge branch 'master' into pgc-vm-operation
>>  - pgc-vm-operation
>
> 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).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20077#discussion_r1674933630


More information about the hotspot-gc-dev mailing list