-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
libc/cg: convert r.CPU.Cpus/Mems to systemd props #2727
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kolyshkin
changed the title
[WIP] libc/cg: convert r.CPU.Cpus/Mems to systemd props
libc/cg: convert r.CPU.Cpus/Mems to systemd props
Jan 11, 2021
This one is ready |
mrunalp
reviewed
Jan 14, 2021
So we need systemd version check... |
As the caller of this function just logs the error, it does not make sense to pass it. Instead, log it (once) and return -1. This is a preparation for the second user. Signed-off-by: Kir Kolyshkin <[email protected]>
Support for systemd properties AllowedCPUs and AllowedMemoryNodes was added by commit 13afa58, but only for unified resources of systemd v2 driver. This adds support for Cpu.Cpus and Cpu.Mems resources to both systemd v1 and v2 cgroup drivers. An integration test is added to check that the settings work. [v2: check for systemd version] [v3: same in the test] Signed-off-by: Kir Kolyshkin <[email protected]>
1. Add a check to unifiedResToSystemdProps that systemd is recent enough to support AllowedCPUs/AllowedMemoryNodes unit properties, and skip setting the property if it is not supported. Note that this is not an error as the setting is still applied to the underlying cgroupfs -- it's just systemd unit property that is being skipped. 2. In all the places we skip an unsupported property, warn about it. Signed-off-by: Kir Kolyshkin <[email protected]>
Two issues:
|
AkihiroSuda
approved these changes
Jan 15, 2021
mrunalp
approved these changes
Jan 21, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support for systemd properties AllowedCPUs and AllowedMemoryNodes
was added by commit 13afa58, but only for unified resources
of systemd v2 driver.
This adds support for Cpu.Cpus and Cpu.Mems resources to
both systemd v1 and v2 cgroup drivers. If systemd is not new
enough to support the properties, a warning is logged.
An integration test is added to check that the settings work.
While at it: