On Tue, 13 May 2025 15:59:19 GMT, Zhengyu Gu <[email protected]> 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 five
>> additional commits since the last revision:
>>
>> - review
>> - Merge branch 'master' into pgc-size-policy
>> - review
>> - Merge branch 'master' into pgc-size-policy
>> - pgc-size-policy
>
> src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp line 51:
>
>> 49: #include "oops/oop.inline.hpp"
>> 50: #include "runtime/cpuTimeCounters.hpp"
>> 51: #include "runtime/globals_extension.hpp"
>
> Don't see why it is needed.
It's needed for `FLAG_IS_DEFAULT`; got a build error without this include.
> src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp line 404:
>
>> 402: collect_at_safepoint(!should_run_young_gc);
>> 403:
>> 404: if (is_gc_overhead_limit_reached()) {
>
> Maybe want to adopt current algorithm, start to clear soft references when
> approaching gc overhead limit?
> Running a full gc and clearing all soft references without retrying
> allocation and throws OOM, seems a bit harsh.
>
> People still use soft references for caches, reclaim soft references could
> potentially free large amount of memory.
Revised a bit; the limitation of what we have on master is that it doesn't
detect gc-overhead for young-gcs. If many young-gcs are run, gc-overhead
checking should kick in as well.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25000#discussion_r2094553207
PR Review Comment: https://git.openjdk.org/jdk/pull/25000#discussion_r2094554006