Skip to content

Conversation

@jfernandez
Copy link

The cpuset controller was using cgroup v1 file names for effective CPUs and memory nodes on cgroup v2 systems. The file names changed between versions:

v1: cpuset.effective_cpus, cpuset.effective_mems
v2: cpuset.cpus.effective, cpuset.mems.effective

This caused cpuset().effective_cpus to return empty on v2 systems since the files don't exist. The controller already tracks the cgroup version via the v2 flag, so use it to select the correct file names.

Fixes: #156

@Tim-Zhang
Copy link
Member

@jfernandez Good catch and there are some problems with the CI, thanks.

The cpuset controller was using cgroup v1 file names for effective CPUs
and memory nodes on cgroup v2 systems. The file names changed between
versions:

v1: cpuset.effective_cpus, cpuset.effective_mems
v2: cpuset.cpus.effective, cpuset.mems.effective

This caused cpuset().effective_cpus to return empty on v2 systems since
the files don't exist. The controller already tracks the cgroup version
via the v2 flag, so use it to select the correct file names.

Fixes: kata-containers#156

Signed-off-by: Jose Fernandez <josef@netflix.com>
@jfernandez jfernandez force-pushed the fix-cpuset-v2-filenames branch from 42cb21b to 5487567 Compare November 22, 2025 21:45
@jfernandez
Copy link
Author

@Tim-Zhang could you approve for another CI run?

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.

cpuset effective_cpus/effective_mems use wrong file names for cgroup v2

2 participants