-
Enhancement
-
Resolution: Unresolved
-
P5
-
22
During the review of JDK-8309403 [1], we found the Parallel GC doesn't decide if it should clear soft references according to gc overhead limit and other relevant metrics.
The ZGC has a comfortable implementation in `zDriver.cpp::should_clear_soft_references`. It is good to implement the related feature in other GCs.
Extract from the PR [1] ofJDK-8309403:
```
I am not sure that using SoftRefGenPolicy is the cleanest way to solve the issue in Parallel. Can we check gc-overhead (and other relevant metrics) at gc-pause-start to decide soft-ref-policy, instead of relying on the global bool? (IOW, can GC make the more active decidion, in contrast to letting others tell GC what to do regarding to soft-refs?)
The approach in should_clear_soft_references of zDriver seems less intrusive to the global env.
```
[1] https://github.com/openjdk/jdk/pull/14296#discussion_r1221624327
The ZGC has a comfortable implementation in `zDriver.cpp::should_clear_soft_references`. It is good to implement the related feature in other GCs.
Extract from the PR [1] of
```
I am not sure that using SoftRefGenPolicy is the cleanest way to solve the issue in Parallel. Can we check gc-overhead (and other relevant metrics) at gc-pause-start to decide soft-ref-policy, instead of relying on the global bool? (IOW, can GC make the more active decidion, in contrast to letting others tell GC what to do regarding to soft-refs?)
The approach in should_clear_soft_references of zDriver seems less intrusive to the global env.
```
[1] https://github.com/openjdk/jdk/pull/14296#discussion_r1221624327
- relates to
-
JDK-8309619 ZGC: 'zDriver.cpp::should_clear_soft_references' should be moved into a subclass of 'SoftRefPolicy'
-
- Open
-
-
JDK-8309403 Serial: Remove the useless adaptive size policy in GenCollectedHeap
-
- Resolved
-
-
JDK-8325081 Move '_soft_ref_policy' to 'CollectedHeap'
-
- Resolved
-