]> xenbits.xensource.com Git - libvirt.git/commitdiff
Revert "qemuDomainSetNumaParamsLive: set nodeset for root cgroup"
authorPavel Hrdina <phrdina@redhat.com>
Fri, 21 May 2021 13:26:59 +0000 (15:26 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 24 May 2021 12:31:42 +0000 (14:31 +0200)
This reverts commit <1b22dd6dd44202094e0f78f887cbe790c00e9ebc>.

First of all, the reverted commit is incomplete. It only sets
cpuset.mems in the VM root cgroup when the API is used but there is no
code that would do the same when the VM is started.

Libvirt never places any process into the VM root cgroup directly. All
the supporting processes like slirp-helper or dbus-daemon are placed
into the emulator sub-cgroup and all the QEMU threads are distributed
between emulator, vcpu* and iothread* sub-cgroups. The scenario
described in the reverted commit can happen only if someone manually
adds any process there which we should not care about.

If we would like to set the limit in the VM root cgroup we need to
introduce better logic:

    - set both (old and new) numa group in the VM root cgroup
    - change the numa group in all sub-cgroups to new value
    - finally set only the new value in the VM root cgroup

The simplest fix now is to revert the commit.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_driver.c

index e10e699a1a4112162bda9919231453c2ab5ea5f1..a972662c3fda69c1274ef2f35559566a18a376bb 100644 (file)
@@ -8797,10 +8797,6 @@ qemuDomainSetNumaParamsLive(virDomainObj *vm,
             return -1;
     }
 
-    /* set nodeset for root cgroup */
-    if (virCgroupSetCpusetMems(priv->cgroup, nodeset_str) < 0)
-        return -1;
-
     return 0;
 }