-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8347129: cpuset cgroups controller is required for no good reason #23037
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
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 65 new commits pushed to the
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 |
|
Not a reviewer, but I've tested your change in the context of https://github.com/oracle/graal native image and it fixes the problems that we were seeing. Thanks! |
|
@dholmes-ora @tstuefe Could you please help review this simple change? Thanks in advance! |
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.
Sorry, just saw that now. Okay.
|
Thanks for the review! |
|
@jerboaa Should this block be updated to not return false as the cpuset is now an optional subsystem. jdk/src/hotspot/os/linux/cgroupSubsystem_linux.cpp Lines 498 to 503 in 56c7800
|
@ashu-mehra Thanks for looking at it! I'm in two minds about this. Why? a) cgroups v1 is becoming increasingly legacy b) the chance that an old v1 system would no longer enable cpusets controller seems unlikely. So while it seems consistent to remove this for cg v1 too, it's unlikely that such a system exists. For example Fedora 41 where this has been observed no longer supports cg v1. I'd expect for other distros to follow. New distros will likely only support cg v2. For those reasons I'd be inclined to keep the patch as-is as it would be less risky for the cg v1 version. Thoughts? |
|
@jerboaa Thanks for the explanation. I agree with you. I think its fine to keep cg v1 as is. |
ashu-mehra
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.
looks good.
|
/integrate |
|
Going to push as commit 2de71d0.
Your commit was automatically rebased without conflicts. |
Please review this small change to make the
cpusetcgroups controller optional as far as the JDK is concerned. The rationale is that:--cpuset-cpusis reflected with thesched_getaffinitysystem call and, thus, the controller doesn't need to be mandatory. The current failure to detect the controller results in no container limits being detected with is bad.The fix is rather simple. Make
cpusetcontroller look-up from/proc/cgroupsoptional (like thepidscontroller) and continue.OSContainer::active_processor_count()still behaves as before (should there be acpusetlimit) as it's covered byos::Linux::active_processor_count()which serves as the upper bound of other container cpu limits.While at it, I've also fixed the logging bug by re-arranging the
const char*values.cpusetis index0,cpuis index1.Testing:
test/hotspot/jtreg/containerson Linux cgroups v1 and cgroups v2 as well as on an affected system (F41 on cg v2). All pass.Thoughts?
Progress
Warning
8347129: cpuset cgroups controller is required for no good reasonIssue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23037/head:pull/23037$ git checkout pull/23037Update a local copy of the PR:
$ git checkout pull/23037$ git pull https://git.openjdk.org/jdk.git pull/23037/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 23037View PR using the GUI difftool:
$ git pr show -t 23037Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23037.diff
Using Webrev
Link to Webrev Comment