Skip to content

8379127: G1 does not properly consider existing surviving data when sizing Eden - #32599

Open
walulyai wants to merge 12 commits into
openjdk:masterfrom
walulyai:old_space_budget
Open

8379127: G1 does not properly consider existing surviving data when sizing Eden#32599
walulyai wants to merge 12 commits into
openjdk:masterfrom
walulyai:old_space_budget

Conversation

@walulyai

@walulyai walulyai commented Aug 31, 2026

Copy link
Copy Markdown
Member

Hi all,

Please review this change, which reduces the likelihood of evacuation failures by considering the required evacuation space when sizing the young generation and selecting old CSet candidate groups.

Currently, G1 considers only predicted pause time when selecting old CSet regions for evacuation. This change extends the selection criteria to also account for predicted bytes to copy during evacuation.

A copy budget for old CSet candidates is derived after reserving space for young CSet evacuation. This budget applies to both candidates from marking and retained regions.

When selecting regions for optional collection, consider only the pause-time budget. Copy-space constraints are checked later, when optional regions are selected for evacuation.

We override both time and copy-space budgets to meet the required minimum old CSet size. Thus, the budgets only apply for additional selection after selecting the minimum regions required for evacuation progress.

Young-generation sizing is also refactored to use the same evacuation predictions: both pause time and bytes to copy. This reserves headroom for required evacuation work when sizing the young generation.

Testing: Mach5 Tiers 1-3



Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8379127: G1 does not properly consider existing surviving data when sizing Eden (Bug - P3)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32599/head:pull/32599
$ git checkout pull/32599

Update a local copy of the PR:
$ git checkout pull/32599
$ git pull https://git.openjdk.org/jdk.git pull/32599/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 32599

View PR using the GUI difftool:
$ git pr show -t 32599

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32599.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Aug 31, 2026

Copy link
Copy Markdown

👋 Welcome back iwalulya! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk

openjdk Bot commented Aug 31, 2026

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot added the hotspot-gc hotspot-gc-dev@openjdk.org label Aug 31, 2026
@openjdk

openjdk Bot commented Aug 31, 2026

Copy link
Copy Markdown

@walulyai The following label will be automatically applied to this pull request:

  • hotspot-gc

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk

openjdk Bot commented Aug 31, 2026

Copy link
Copy Markdown

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot-gc. This can be overridden with the /reviewers command.

@walulyai
walulyai marked this pull request as ready for review September 1, 2026 07:57
@openjdk openjdk Bot added the rfr Pull request is ready for review label Sep 1, 2026
@mlbridge

mlbridge Bot commented Sep 1, 2026

Copy link
Copy Markdown

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-gc hotspot-gc-dev@openjdk.org rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant