mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
util: enable cgroups v2 cpuset controller for threads
When we create cgroup for qemu threads we need to enable cpuset controller in order to use it. Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
3b72c84ff1
commit
a6aedcf39b
@ -400,6 +400,12 @@ virCgroupV2MakeGroup(virCgroupPtr parent ATTRIBUTE_UNUSED,
|
||||
VIR_CGROUP_CONTROLLER_CPU) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (virCgroupV2HasController(parent, VIR_CGROUP_CONTROLLER_CPUSET) &&
|
||||
virCgroupV2EnableController(parent,
|
||||
VIR_CGROUP_CONTROLLER_CPUSET) < 0) {
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
size_t i;
|
||||
for (i = 0; i < VIR_CGROUP_CONTROLLER_LAST; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user