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

8253797: [cgroups v2] Account for the fact that swap accounting is disabled on some systems #1672

Conversation

jerboaa
Copy link
Contributor

@jerboaa jerboaa commented Dec 7, 2020

This has been implemented for cgroups v1 with JDK-8250984 but was lacking some tooling support for cgroups v2. With podman 2.2.0 release this could now be implemented (and tested). The idea is the same as for the cgroups v1 fix. If we've got no swap limit capabilities, return the memory limit only.

Note that for cgroups v2 doesn't implement CgroupV1Metrics (obviously) and, thus, doesn't have getMemoryAndSwapFailCount() and getMemoryAndSwapMaxUsage().

Testing:

  • submit testing
  • container tests on cgroups v2 with swapaccount=0.
  • Manual container tests involving -XshowSettings:system on cgroups v2.

Thoughts?


Progress

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

Issue

  • JDK-8253797: [cgroups v2] Account for the fact that swap accounting is disabled on some systems

Reviewers

Download

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

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 7, 2020

👋 Welcome back sgehwolf! 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 Dec 7, 2020
@openjdk
Copy link

openjdk bot commented Dec 7, 2020

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

  • core-libs
  • hotspot-runtime

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-runtime hotspot-runtime-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Dec 7, 2020
@jerboaa
Copy link
Contributor Author

jerboaa commented Dec 7, 2020

/label remove hotspot-runtime

@openjdk openjdk bot removed the hotspot-runtime hotspot-runtime-dev@openjdk.org label Dec 7, 2020
@openjdk
Copy link

openjdk bot commented Dec 7, 2020

@jerboaa
The hotspot-runtime label was successfully removed.

@jerboaa
Copy link
Contributor Author

jerboaa commented Dec 7, 2020

/label add serviceability-dev

@openjdk openjdk bot added the serviceability serviceability-dev@openjdk.org label Dec 7, 2020
@openjdk
Copy link

openjdk bot commented Dec 7, 2020

@jerboaa
The serviceability label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Dec 7, 2020

Webrevs

Copy link
Member

@hseigel hseigel left a comment

Choose a reason for hiding this comment

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

The changes look good. Thanks for doing this.
Harold

@openjdk
Copy link

openjdk bot commented Dec 10, 2020

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

8253797: [cgroups v2] Account for the fact that swap accounting is disabled on some systems

Reviewed-by: hseigel

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

  • d163c6f: 8258015: [JVMCI] JVMCI_lock shouldn't be held while initializing box classes
  • b35401d: 8257966: Instrument test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/StateTestService.java
  • 37043b0: 8257837: Performance regression in heap byte buffer views
  • 0890620: 8258005: JDK build fails with incorrect fixpath script
  • 502a524: 8257602: Introduce JFR Event Throttling and new jdk.ObjectAllocationSample event (enabled by default)
  • 026b09c: 8257483: C2: Split immediate vector rotate from RotateLeftV and RotateRightV nodes
  • 0a0691e: 8257901: ZGC: Take virtual memory usage into account when sizing heap
  • 29ffffa: 8257997: sun/security/ssl/SSLSocketImpl/SSLSocketLeak.java again reports leaks after JDK-8257884
  • db5da96: 8257876: Avoid Reference.isEnqueued in tests
  • 4a839e9: 8256459: java/net/httpclient/ManyRequests.java and java/net/httpclient/LineBodyHandlerTest.java fail infrequently with java.net.ConnectException: Connection timed out: no further information
  • ... and 86 more: https://git.openjdk.java.net/jdk/compare/05dac03f36a593c3e838552639ebf6820fd6c504...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 Dec 10, 2020
@jerboaa
Copy link
Contributor Author

jerboaa commented Dec 10, 2020

The changes look good. Thanks for doing this.

Thanks for the review!

@jerboaa
Copy link
Contributor Author

jerboaa commented Dec 10, 2020

/integrate

@openjdk openjdk bot closed this Dec 10, 2020
@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 Dec 10, 2020
@openjdk
Copy link

openjdk bot commented Dec 10, 2020

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

  • 6be1f56: 8257450: Start of release updates for JDK 17
  • d163c6f: 8258015: [JVMCI] JVMCI_lock shouldn't be held while initializing box classes
  • b35401d: 8257966: Instrument test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/StateTestService.java
  • 37043b0: 8257837: Performance regression in heap byte buffer views
  • 0890620: 8258005: JDK build fails with incorrect fixpath script
  • 502a524: 8257602: Introduce JFR Event Throttling and new jdk.ObjectAllocationSample event (enabled by default)
  • 026b09c: 8257483: C2: Split immediate vector rotate from RotateLeftV and RotateRightV nodes
  • 0a0691e: 8257901: ZGC: Take virtual memory usage into account when sizing heap
  • 29ffffa: 8257997: sun/security/ssl/SSLSocketImpl/SSLSocketLeak.java again reports leaks after JDK-8257884
  • db5da96: 8257876: Avoid Reference.isEnqueued in tests
  • ... and 87 more: https://git.openjdk.java.net/jdk/compare/05dac03f36a593c3e838552639ebf6820fd6c504...master

Your commit was automatically rebased without conflicts.

Pushed as commit 6693611.

💡 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
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

2 participants