[libvirt] [PATCH v3 3/7] [ACKED] util: vircgroupv2: use any controller to create thread directory

Pavel Hrdina phrdina at redhat.com
Tue Jun 25 11:16:22 UTC 2019


The assumption that CPU controller would be always enabled is wrong, we
should use any available controller to create a new sub-cgroup.

Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
Reviewed-by: Ján Tomko <jtomko at redhat.com>
---
 src/util/vircgroupv2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c
index 29b5806a01..6bcbb7e1a0 100644
--- a/src/util/vircgroupv2.c
+++ b/src/util/vircgroupv2.c
@@ -399,7 +399,7 @@ virCgroupV2MakeGroup(virCgroupPtr parent ATTRIBUTE_UNUSED,
 
     if (create) {
         if (flags & VIR_CGROUP_THREAD) {
-            if (virCgroupSetValueStr(group, VIR_CGROUP_CONTROLLER_CPU,
+            if (virCgroupSetValueStr(group, controller,
                                      "cgroup.type", "threaded") < 0) {
                 return -1;
             }
-- 
2.21.0




More information about the libvir-list mailing list