Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8314573: G1: Heap resizing at Remark does not take existing eden regions into account #429

Closed
wants to merge 1 commit into from

Conversation

mmyxym
Copy link

@mmyxym mmyxym commented Apr 1, 2024

Clean backport of fix of G1 Heap resizing heuristics at remark

Additional testing:

  • Linux aarch64 server release/fastdebug, test/hotspot/jtreg/gc with +UseG1GC

Progress

  • JDK-8314573 needs maintainer approval
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8314573: G1: Heap resizing at Remark does not take existing eden regions into account (Bug - P3 - Approved)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/429/head:pull/429
$ git checkout pull/429

Update a local copy of the PR:
$ git checkout pull/429
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/429/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 429

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/429.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 1, 2024

👋 Welcome back lmao! 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
Copy link

openjdk bot commented Apr 1, 2024

@mmyxym 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:

8314573: G1: Heap resizing at Remark does not take existing eden regions into account

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 121 new commits pushed to the master branch:

  • 56a9090: 8312014: [s390x] TestSigInfoInHsErrFile.java Failure
  • c922c50: 8322962: Upcall stub might go undetected when freezing frames
  • cbd30c9: 8325095: C2: bailout message broken: ResourceArea allocated string used after free
  • 75ac9e8: 8328168: Epsilon: Premature OOM when allocating object larger than uncommitted heap size
  • a0e8de8: 8330156: RISC-V: Range check auipc + signed 12 imm instruction
  • e7ebae5: 8321713: Harmonize executeTestJvm with create[Limited]TestJavaProcessBuilder
  • d8bc9e4: 8331113: createJMHBundle.sh support configurable maven repo mirror
  • d1b97d4: 8309142: Refactor test/langtools/tools/javac/versions/Versions.java
  • e59f4fa: 8328194: Add a test to check default rendering engine
  • 6f07ee4: 8324733: [macos14] Problem list tests which fail due to macOS bug described in JDK-8322653
  • ... and 111 more: https://git.openjdk.org/jdk21u-dev/compare/6791646b9f9673ea36a67e5af7584929dfb16069...master

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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot changed the title Backport 762b652912939b37fbd68955617705c62b9fc3a5 8314573: G1: Heap resizing at Remark does not take existing eden regions into account Apr 1, 2024
@openjdk
Copy link

openjdk bot commented Apr 1, 2024

This backport pull request has now been updated with issue from the original commit.

@openjdk
Copy link

openjdk bot commented Apr 1, 2024

⚠️ @mmyxym This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 1, 2024
@mlbridge
Copy link

mlbridge bot commented Apr 1, 2024

Webrevs

@mmyxym
Copy link
Author

mmyxym commented Apr 1, 2024

/approval request Clean backport of fix of G1 Heap resizing heuristics at remark. Risk is low which only affects the heuristics.

@openjdk
Copy link

openjdk bot commented Apr 1, 2024

@mmyxym
8314573: The approval request has been created successfully.

@openjdk openjdk bot added the approval label Apr 1, 2024
@GoeLin
Copy link
Member

GoeLin commented Apr 4, 2024

Hi @mmyxym, I don't think the risk is that low.
After all, someone opened JDK-8315866 because his GC behaved differently. Something like this can obstruct a producitve system.

@jerboaa
Copy link
Contributor

jerboaa commented Apr 5, 2024

I agree with @GoeLin. @mmyxym Please explain in more detail why you think this backport is needed for JDK 21u. The explanation given isn't very convincing. We'd be trading (potentially) more cpu cycles for (potentially) less use of memory.

@mmyxym
Copy link
Author

mmyxym commented Apr 9, 2024

@GoeLin@jerboaa,I have noticed the original issue that heap resizing counted eden region size since the original JEP346 arrived in JDK12. The heap resizing heuristics in G1 remark Pause is similar to the one in Full GC which will estimate the heap capacity based on live set size. But counting of eden region size as part of live set will make the resizing behavior unexpected due to random eden use at remark pause . Only counting old objects as live set is more reasonable. As @tschatzl described in JDK-8315866, the behavior is expected which uses less memory for more gc activity.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval labels Apr 25, 2024
@mmyxym
Copy link
Author

mmyxym commented Apr 30, 2024

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Apr 30, 2024
@openjdk
Copy link

openjdk bot commented Apr 30, 2024

@mmyxym
Your change (at version 0791705) is now ready to be sponsored by a Committer.

@mmyxym
Copy link
Author

mmyxym commented Apr 30, 2024

Hi, could any committers help with the integration? Thanks.

@zhengyu123
Copy link
Contributor

/sponsor

@openjdk
Copy link

openjdk bot commented May 7, 2024

Going to push as commit 93d091a.
Since your change was applied there have been 141 commits pushed to the master branch:

  • 41fda4a: 8319376: ParallelGC: Forwarded objects found during heap inspection
  • ec6b326: 8310913: Move ReferencedKeyMap to jdk.internal so it may be shared
  • 92b43c5: 8317007: Add bulk removal of dead nmethods during class unloading
  • ed2f5a8: 8310228: Improve error reporting for uncaught native exceptions on Windows
  • 7a400f2: 8309890: TestStringDeduplicationInterned.java waits for the wrong condition
  • 16ba673: 8331639: [21u]: Bump GHA bootstrap JDK to 21.0.3
  • 2b858f5: 8328938: C2 SuperWord: disable vectorization for large stride and scale
  • 9159882: 8310513: [s390x] Intrinsify recursive ObjectMonitor locking
  • 3ff5359: 8330011: [s390x] update block-comments to make code consistent
  • abbad92: 8326201: [S390] Need to bailout cleanly if creation of stubs fails when code cache is out of space
  • ... and 131 more: https://git.openjdk.org/jdk21u-dev/compare/6791646b9f9673ea36a67e5af7584929dfb16069...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 7, 2024
@openjdk openjdk bot closed this May 7, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels May 7, 2024
@openjdk
Copy link

openjdk bot commented May 7, 2024

@zhengyu123 @mmyxym Pushed as commit 93d091a.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport clean integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants