-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8331560: Refactor Hotspot container detection code so that subsystem delegates to controllers #19085
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
8331560: Refactor Hotspot container detection code so that subsystem delegates to controllers #19085
Conversation
|
👋 Welcome back sgehwolf! A progress list of the required criteria for merging this PR into |
|
@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: 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 10 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
Hybrid MACRO usage and locked down reading primitives.
It only reads the swap value, thus doesn't print: "Memory and Swap Limit is" but rather prints: "Swap Limit is". This is fine, since for cg v2 the memory limit and the swap limits are in different files.
|
@jerboaa this pull request can not be integrated into git checkout jdk-8331560-cgroup-controller-delegation
git fetch https://git.openjdk.org/jdk.git pr/19060
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge pr/19060"
git push |
|
There is the diamond inheritance problem. I am providing a patch, it would be too much clicking in the Github review. |
jdksjolen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Some more review work here. Unfortunately, mostly nits. I'll take a more big-picture look next.
|
Thanks for the review. Updated the patch! |
jdksjolen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Some more review comments.
|
Updated the patch with your suggestions. Thanks! |
tstuefe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been shaping up nicely. From my point of view, this is good to go. Leave it up to @jdksjolen to add any more suggestions.
|
Thanks for the review, Thomas! |
jdksjolen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went through it again, LGTM. Nice!
|
Thanks for the reviews! |
|
/integrate |
|
Going to push as commit 153b12b.
Your commit was automatically rebased without conflicts. |
Please review this preparatory PR which is an enabler for some bugfix/alignment work (e.g. JDK-8322420). The idea is to delegate limit lookup to controllers (
memory,cpu, etc.) from the overarchingCgroupSubsystemclass. This way we can - once the cg type has been detected - "adjust" a controller's path to the limit files when the controller is being created (on init) and then left alone. In this case, the two preparatory entry points areCgroupUtil::processor_count()taking a version-agnosticCgroupCpuControllerto do the actual look-up andCgroupMemoryController::read_memory_limit_in_bytes()for the same in terms of memory limits.This enables setting the contoller's path to the interface files (wherever it might be in the hierarchy of it's original cgroup path), look up the limit and "freeze" the path once it found a - lower - limit.
It also ensures that both cgroup versions return
-1or-2(OSCONTAINER_ERROR) - in both cases negative - for some notion of unlimited. I.e. it makes the upper bound by the host's physical memory apparent in the version agnostic classes.Testing:
Thoughts?
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19085/head:pull/19085$ git checkout pull/19085Update a local copy of the PR:
$ git checkout pull/19085$ git pull https://git.openjdk.org/jdk.git pull/19085/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19085View PR using the GUI difftool:
$ git pr show -t 19085Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19085.diff
Webrev
Link to Webrev Comment