Skip to content

Conversation

@AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Oct 27, 2025

runc v1.3.2 and crun v1.2.3 adopted the new formula for converting CPU shares to cgroup v2 weight.

See:


Note

The function modified in this PR does NOT appear to be actually used in containerd, as containerd utilizes runc or crun to set up the CPU weight:
https://github.com/search?q=org%3Acontainerd+ToResources&type=code

Some third-party repos seem to be using it though:
https://github.com/search?q=cgroup2.ToResources&type=code

runc v1.3.2 and crun v1.2.3 adopted the new formula for converting
CPU shares to cgroup v2 weight.

See opencontainers/cgroups PR 20

Signed-off-by: Akihiro Suda <[email protected]>
@fuweid fuweid merged commit 6b761e5 into containerd:main Oct 27, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants