[libvirt PATCH] Revert "qemuDomainSetNumaParamsLive: set nodeset for root cgroup"
mprivozn at redhat.com
Fri May 21 15:56:16 UTC 2021
On 5/21/21 3:40 PM, Pavel Hrdina wrote:
> 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 at redhat.com>
> src/qemu/qemu_driver.c | 4 ----
> 1 file changed, 4 deletions(-)
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index e10e699a1a..a972662c3f 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -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;
Reviewed-by: Michal Privoznik <mprivozn at redhat.com>
More information about the libvir-list