Skip to content

8261600: NMT: Relax memory order for updating MemoryCounter and fix racy updating of peak values #2527

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

Closed

Conversation

zhengyu123
Copy link
Contributor

@zhengyu123 zhengyu123 commented Feb 11, 2021

Currently, MemoryCounter is updated with default memory_order_conservative, it is too strong for updating a counter.

Also, updating peak values with regular assignment, which is racy and broken.

  • hotspot_nmt on Linux x86_64 and aarch64

Progress

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

Issue

  • JDK-8261600: NMT: Relax memory order for updating MemoryCounter and fix racy updating of peak values

Reviewers

Download

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

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 11, 2021

👋 Welcome back zgu! 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 Feb 11, 2021

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

  • hotspot-runtime

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-runtime hotspot-runtime-dev@openjdk.org label Feb 11, 2021
@zhengyu123 zhengyu123 marked this pull request as ready for review February 11, 2021 17:17
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 11, 2021
@mlbridge
Copy link

mlbridge bot commented Feb 11, 2021

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Hi Zhengyu,

This seems okay.

Thanks,
David

@openjdk
Copy link

openjdk bot commented Feb 18, 2021

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

8261600: NMT: Relax memory order for updating MemoryCounter and fix racy updating of peak values

Reviewed-by: dholmes, shade

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

  • 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
  • 05301f5: 8257497: Update keytool to create AKID from the SKID of the issuing certificate as specified by RFC 5280
  • ... and 90 more: https://git.openjdk.java.net/jdk/compare/a7726390cc00eed9833574ca716f724bd9689952...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 Pull request is ready to be integrated label Feb 18, 2021
Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

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

This looks fine to me too.

@zhengyu123
Copy link
Contributor Author

Thanks for reviewing, @dholmes-ora and @shipilev

@zhengyu123
Copy link
Contributor 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

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

  • 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
  • 05301f5: 8257497: Update keytool to create AKID from the SKID of the issuing certificate as specified by RFC 5280
  • ... and 90 more: https://git.openjdk.java.net/jdk/compare/a7726390cc00eed9833574ca716f724bd9689952...master

Your commit was automatically rebased without conflicts.

Pushed as commit f94a845.

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

@zhengyu123 zhengyu123 deleted the JDK-8261600-nmt-memorycounter branch May 2, 2022 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants