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

8261838: Shenandoah: reconsider heap region iterators memory ordering #2593

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Feb 16, 2021

We use CASes to distributed workers between regions. Hotspot's default for atomic operations is memory_order_conservative, which emits two-way memory fences around the CASes at least on AArch64 and PPC64.

This seems to be excessive for region distribution code, and "relaxed" is enough, since we don't piggyback memory ordering on these.

This also calls for some refactoring in the code itself.

Additional testing:

  • hotspot_gc_shenandoah
  • Ad-hoc performance runs

Progress

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

Issue

  • JDK-8261838: Shenandoah: reconsider heap region iterators memory ordering

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2593/head:pull/2593
$ git checkout pull/2593

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 16, 2021

👋 Welcome back shade! 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 added the rfr Pull request is ready for review label Feb 16, 2021
@openjdk
Copy link

openjdk bot commented Feb 16, 2021

@shipilev The following labels will be automatically applied to this pull request:

  • hotspot-gc
  • shenandoah

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

@openjdk openjdk bot added hotspot-gc hotspot-gc-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Feb 16, 2021
@mlbridge
Copy link

mlbridge bot commented Feb 16, 2021

Webrevs

Copy link
Contributor

@rkennke rkennke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@openjdk
Copy link

openjdk bot commented Feb 16, 2021

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

8261838: Shenandoah: reconsider heap region iterators memory ordering

Reviewed-by: rkennke

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

  • 0a50688: 8241372: Several test failures due to javax.net.ssl.SSLException: Connection reset
  • 61a659f: 8260415: Remove unused class ReferenceProcessorMTProcMutator
  • 6b6f794: 8248223: KeyAgreement spec update on multi-party key exchange support
  • 8ba390d: 8261753: Test java/lang/System/OsVersionTest.java still failing on BigSur patch versions after JDK-8253702
  • 16bd7d3: 8261336: IGV: enhance default filters

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 Pull request is ready to be integrated label Feb 16, 2021
@shipilev
Copy link
Member Author

/integrate

@openjdk openjdk bot closed this Feb 18, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Feb 18, 2021
@openjdk
Copy link

openjdk bot commented Feb 18, 2021

@shipilev Since your change was applied there have been 33 commits pushed to the master branch:

  • f94a845: 8261600: NMT: Relax memory order for updating MemoryCounter and fix racy updating of peak values
  • 1a7adc8: 8260416: Remove unused method ReferenceProcessor::is_mt_processing_set_up()
  • 3a21e1d: 8260653: Unreachable nodes keep speculative types alive
  • b695c7e: 8261925: ProblemList com/sun/jdi/AfterThreadDeathTest.java on Linux
  • 97e1657: 8261846: [JVMCI] c2v_iterateFrames can get out of sync with the StackFrameStream
  • b8fd614: 8261939: os::strdup_check_oom() should be used in os::same_files() in os_windows.cpp
  • 5f30829: 8202750: Reduce the use of get_canonical_path() in CDS
  • ea5bf45: 8261621: Delegate Unicode history from JLS to j.l.Character
  • d5a4d22: 8261843: incorrect info in docs/building.html
  • bf75a3a: 8261851: update ReflectionCallerCacheTest.java test to use ForceGC from test library
  • ... and 23 more: https://git.openjdk.java.net/jdk/compare/3f8819c66640dff98added4340ea30d9740a9fc2...master

Your commit was automatically rebased without conflicts.

Pushed as commit fd098e7.

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

@shipilev shipilev deleted the JDK-8261838-shenandoah-heapreg-memord branch March 4, 2021 09:30
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 integrated Pull request has been integrated shenandoah shenandoah-dev@openjdk.org
2 participants