8377180: Shenandoah: make escalation from degen to full more conservative#29574
8377180: Shenandoah: make escalation from degen to full more conservative#29574kdnilsen wants to merge 4 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back kdnilsen! A progress list of the required criteria for merging this PR into |
|
@kdnilsen This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 34 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
earthling-amzn
left a comment
There was a problem hiding this comment.
Looks good, suggest one small change.
| // Genshen will only upgrade to a full gc after the configured number of futile degenerated cycles. | ||
| bool generational_should_upgrade_degenerated_gc() const { | ||
| bool should_upgrade_degenerated_gc() const { | ||
| return _consecutive_degenerated_gcs_without_progress >= GENERATIONAL_CONSECUTIVE_BAD_DEGEN_PROGRESS_THRESHOLD; |
There was a problem hiding this comment.
Shall we rename GENERATIONAL_CONSECUTIVE_BAD_DEGEN_PROGRESS_THRESHOLD as well? Perhaps CONSECUTIVE_BAD_DEGEN_PROGRESS_THRESHOLD?
pengxiaolong
left a comment
There was a problem hiding this comment.
Traditional Shenandoah will have same upgrade policy as Genshen with the change.
Looks good to me, thanks!
This PR merges into Traditional Shenandoah an optimization that was applied to Generational Shenandoah in September 2025 and has proven itself effective in that context. See #27456
The change is to not immediately escalate Degenerated GC to Full GC following "bad progress" by Degen GC. The most common reason for bad degenerated progress is that most of the potential garbage was created following the start of the concurrent GC cycle which degenerated. This "floating" garbage cannot be reclaimed by the degenerated cycle because of the SATB protocol.
Pursuing at least one additional concurrent cycle, even if that subsequent concurrent GC degenerates, is usually a much better approach than forcing immediate escalation to Full GC. While escalation to full GC will resolve the out-of-memory condition, it imposes unnecessarily long stop-the-world pauses:
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/29574/head:pull/29574$ git checkout pull/29574Update a local copy of the PR:
$ git checkout pull/29574$ git pull https://git.openjdk.org/jdk.git pull/29574/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 29574View PR using the GUI difftool:
$ git pr show -t 29574Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/29574.diff
Using Webrev
Link to Webrev Comment