render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
c480ed
From 281c86a0556bd04ad2b3d7264f36c109c646a692 Mon Sep 17 00:00:00 2001
c480ed
Message-Id: <281c86a0556bd04ad2b3d7264f36c109c646a692@dist-git>
c480ed
From: Pavel Hrdina <phrdina@redhat.com>
c480ed
Date: Mon, 1 Jul 2019 17:08:18 +0200
c480ed
Subject: [PATCH] util: vircgroupv2: use any controller to create thread
c480ed
 directory
c480ed
MIME-Version: 1.0
c480ed
Content-Type: text/plain; charset=UTF-8
c480ed
Content-Transfer-Encoding: 8bit
c480ed
c480ed
The assumption that CPU controller would be always enabled is wrong, we
c480ed
should use any available controller to create a new sub-cgroup.
c480ed
c480ed
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
c480ed
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c480ed
(cherry picked from commit 535bdf83c0b0372e725650c56b4996ff83406254)
c480ed
c480ed
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689297
c480ed
c480ed
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
c480ed
Message-Id: <c66a8d07101971e7842f3a6fa8a84373a0c9e90f.1561993100.git.phrdina@redhat.com>
c480ed
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c480ed
---
c480ed
 src/util/vircgroupv2.c | 2 +-
c480ed
 1 file changed, 1 insertion(+), 1 deletion(-)
c480ed
c480ed
diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c
c480ed
index 10f8a9bbdf..04cbadd6a6 100644
c480ed
--- a/src/util/vircgroupv2.c
c480ed
+++ b/src/util/vircgroupv2.c
c480ed
@@ -398,7 +398,7 @@ virCgroupV2MakeGroup(virCgroupPtr parent ATTRIBUTE_UNUSED,
c480ed
 
c480ed
     if (create) {
c480ed
         if (flags & VIR_CGROUP_THREAD) {
c480ed
-            if (virCgroupSetValueStr(group, VIR_CGROUP_CONTROLLER_CPU,
c480ed
+            if (virCgroupSetValueStr(group, controller,
c480ed
                                      "cgroup.type", "threaded") < 0) {
c480ed
                 return -1;
c480ed
             }
c480ed
-- 
c480ed
2.22.0
c480ed