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


Copy link

@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


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


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



$ git fetch pull/2593/head:pull/2593
$ git checkout pull/2593

Copy link

@bridgekeeper 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 label Feb 16, 2021
Copy link

@openjdk 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 shenandoah labels Feb 16, 2021
Copy link

@mlbridge mlbridge bot commented Feb 16, 2021


Copy link

@rkennke rkennke left a comment

Looks good!

Copy link

@openjdk 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 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 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/ 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 label Feb 16, 2021
Copy link
Contributor Author

@shipilev shipilev commented Feb 18, 2021


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

@openjdk 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/ 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 test to use ForceGC from test library
  • ... and 23 more:

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 Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
hotspot-gc integrated shenandoah
2 participants