JDK-8268163 : Change the order of fallback full GCs in G1
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-06-03
  • Updated: 2021-06-11
  • Resolved: 2021-06-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b26Fixed
Related Reports
Relates :  
Relates :  
Description
The code trying to make sure there is space to allocate in after a young collections looks a bit backwards. Currently we have three levels of fall back full GCs doing like this:
1. Upgraded no free regions, will clear soft references, not maximal
2. Satisfy failed alloc #1, will not clearing soft references, not maximal
3. Satisfy failed alloc #2, will clear soft references and maximal

To me it would feel more natural to have:
1. Upgraded, not clear, not maximal
2. Satisfy #1, clear, not maximal
3. Satisfy #2, clear and maximal

We need to investigate this a bit to make sure there is not important reason for clearing the soft references in the first "upgraded" full GC.
Comments
Changeset: 5fbb62c7 Author: Stefan Johansson <sjohanss@openjdk.org> Date: 2021-06-09 13:43:48 +0000 URL: https://git.openjdk.java.net/jdk/commit/5fbb62c74186417eaeff808ea070b35e5e95267a
09-06-2021