[PATCH 2/3] qemu: process: Fix start with unpluggable vcpus with NUMA pinning

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

 



Similarly to vcpu hotplug the emulator thread cgroup numa mapping needs
to be relaxed while hot-adding vcpus so that the threads can allocate
data in the DMA zone.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1370084
---
 src/qemu/qemu_process.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index ec6b547..e6e91df 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4864,6 +4864,8 @@ qemuProcessSetupHotpluggableVcpus(virQEMUDriverPtr driver,
                                   qemuDomainAsyncJob asyncJob)
 {
     unsigned int maxvcpus = virDomainDefGetVcpusMax(vm->def);
+    qemuDomainObjPrivatePtr priv = vm->privateData;
+    qemuCgroupEmulatorAllNodesDataPtr emulatorCgroup = NULL;
     virDomainVcpuDefPtr vcpu;
     qemuDomainVcpuPrivatePtr vcpupriv;
     virJSONValuePtr vcpuprops = NULL;
@@ -4896,6 +4898,9 @@ qemuProcessSetupHotpluggableVcpus(virQEMUDriverPtr driver,
     qsort(bootHotplug, nbootHotplug, sizeof(*bootHotplug),
           qemuProcessVcpusSortOrder);

+    if (qemuCgroupEmulatorAllNodesAllow(priv->cgroup, &emulatorCgroup) < 0)
+        goto cleanup;
+
     for (i = 0; i < nbootHotplug; i++) {
         vcpu = bootHotplug[i];

@@ -4920,6 +4925,7 @@ qemuProcessSetupHotpluggableVcpus(virQEMUDriverPtr driver,
     ret = 0;

  cleanup:
+    qemuCgrouEmulatorAllNodesRestore(emulatorCgroup);
     VIR_FREE(bootHotplug);
     virJSONValueFree(vcpuprops);
     return ret;
-- 
2.10.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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]