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

8274191: Improve g1 evacuation failure injector performance #5650

Conversation

tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Sep 23, 2021

Hi all,

can I have reviews for this change that improves evacuation failure injector performance to be usable for pinned region performance work?

The suspected reason I think why performance is so bad (image in the CR), is that the unsynchronized reads and writes to G1YoungGCEvacFailureInjector::_evacuation_failure_object_count cause massive performance issue if done millions of times.

This change makes that counter thread-local, fixing that issue completely.

I initially had a prototype using a THREAD_LOCAL, but when testing I had the feeling that this is/was slightly slower and I thought that adding a variable to every thread where most do not use them seems to be a waste.

Testing: local testing, GHA

Thanks,
Thomas


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8274191: Improve g1 evacuation failure injector performance

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5650/head:pull/5650
$ git checkout pull/5650

Update a local copy of the PR:
$ git checkout pull/5650
$ git pull https://git.openjdk.java.net/jdk pull/5650/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5650

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5650.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Sep 23, 2021

👋 Welcome back tschatzl! 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 openjdk bot commented Sep 23, 2021

@tschatzl 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 added the hotspot-gc label Sep 23, 2021
@tschatzl tschatzl marked this pull request as ready for review Sep 23, 2021
@openjdk openjdk bot added the rfr label Sep 23, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Sep 23, 2021

Webrevs

Copy link

@kimbarrett kimbarrett left a comment

Good find. Looks good. Just a couple nits.

src/hotspot/share/gc/g1/g1ParScanThreadState.cpp Outdated Show resolved Hide resolved
@openjdk
Copy link

@openjdk openjdk bot commented Sep 23, 2021

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

8274191: Improve g1 evacuation failure injector performance

Reviewed-by: kbarrett, ayang

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 master branch:

  • 971aa35: 8274083: Update testing docs to mention tiered testing
  • 1d44014: 8273034: Make javadoc navigation collapsible on small displays
  • bb74ae8: 8274171: java/nio/file/Files/probeContentType/Basic.java failed on "Content type" mismatches
  • 56b8b35: 8273261: Replace 'while' cycles with iterator with enhanced-for in java.base
  • 0aa63fe: 8274216: ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all
  • 5ffbe75: 8274195: Doc cleanup in java.nio.file
  • 1fdc656: 8274175: (fc) java/nio/channels/FileChannel/Transfer2GPlus.java still failed in timeout
  • 3b1b8fc: 8269850: Most JDK releases report macOS version 12 as 10.16 instead of 12.0
  • 1b7f4b7: 8274169: HotSpot Style Guide has stale link to chromium style guide
  • 653a612: 8270156: Add "randomness" and "stress" keys to JTreg tests which use StressGCM, StressLCM and/or StressIGVN
  • ... and 24 more: https://git.openjdk.java.net/jdk/compare/aefd4ac4a336f00c067bcb91b95472ccc9a6bf83...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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Sep 23, 2021
@tschatzl
Copy link
Contributor Author

@tschatzl tschatzl commented Sep 24, 2021

Thanks @albertnetymk @kimbarrett for your reviews

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Sep 24, 2021

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

  • d91e227: 8238274: (sctp) JDK-7118373 is not fixed for SctpChannel
  • 971aa35: 8274083: Update testing docs to mention tiered testing
  • 1d44014: 8273034: Make javadoc navigation collapsible on small displays
  • bb74ae8: 8274171: java/nio/file/Files/probeContentType/Basic.java failed on "Content type" mismatches
  • 56b8b35: 8273261: Replace 'while' cycles with iterator with enhanced-for in java.base
  • 0aa63fe: 8274216: ProblemList 2 serviceability/dcmd/gc tests with ZGC on linux-all and windows-all
  • 5ffbe75: 8274195: Doc cleanup in java.nio.file
  • 1fdc656: 8274175: (fc) java/nio/channels/FileChannel/Transfer2GPlus.java still failed in timeout
  • 3b1b8fc: 8269850: Most JDK releases report macOS version 12 as 10.16 instead of 12.0
  • 1b7f4b7: 8274169: HotSpot Style Guide has stale link to chromium style guide
  • ... and 25 more: https://git.openjdk.java.net/jdk/compare/aefd4ac4a336f00c067bcb91b95472ccc9a6bf83...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Sep 24, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Sep 24, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Sep 24, 2021

@tschatzl Pushed as commit db23ecd.

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

@tschatzl tschatzl deleted the submit/8274191-evac-failure-injector-performance branch Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-gc integrated
3 participants