[libvirt PATCH 14/15] qemu: create cgroup regardless of controller support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

This allow for basic process management, at least.

Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
---
 src/qemu/qemu_process.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 6b9f6fb860..0c33eab26c 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -2674,6 +2674,9 @@ qemuProcessSetupPid(virDomainObjPtr vm,
         afinity_cpumask = hostcpumap;
     }
 
+    if (priv->cgroup && virCgroupNewThread(priv->cgroup, nameval, id, true, &cgroup) < 0)
+        goto cleanup;
+
     /*
      * If CPU cgroup controller is not initialized here, then we need
      * neither period nor quota settings.  And if CPUSET controller is
@@ -2689,9 +2692,6 @@ qemuProcessSetupPid(virDomainObjPtr vm,
                                                 &mem_mask, -1) < 0)
             goto cleanup;
 
-        if (virCgroupNewThread(priv->cgroup, nameval, id, true, &cgroup) < 0)
-            goto cleanup;
-
         if (virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPUSET)) {
             if (use_cpumask &&
                 qemuSetupCgroupCpusetCpus(cgroup, use_cpumask) < 0)
-- 
2.26.0.rc2.42.g98cedd0233





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux