|
|
6ae9ed |
From b917728ea6ae2e11c9ce5a46de1eedcdbe366748 Mon Sep 17 00:00:00 2001
|
|
|
6ae9ed |
Message-Id: <b917728ea6ae2e11c9ce5a46de1eedcdbe366748@dist-git>
|
|
|
6ae9ed |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
6ae9ed |
Date: Wed, 7 Sep 2016 16:12:14 +0200
|
|
|
6ae9ed |
Subject: [PATCH] qemu: process: Fix start with unpluggable vcpus with NUMA
|
|
|
6ae9ed |
pinning
|
|
|
6ae9ed |
|
|
|
6ae9ed |
https://bugzilla.redhat.com/show_bug.cgi?id=1097930
|
|
|
6ae9ed |
|
|
|
6ae9ed |
Similarly to vcpu hotplug the emulator thread cgroup numa mapping needs
|
|
|
6ae9ed |
to be relaxed while hot-adding vcpus so that the threads can allocate
|
|
|
6ae9ed |
data in the DMA zone.
|
|
|
6ae9ed |
|
|
|
6ae9ed |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1370084
|
|
|
6ae9ed |
(cherry picked from commit 68115fe0abf833a5d1dfb3a00aa216c332e84acb)
|
|
|
6ae9ed |
---
|
|
|
6ae9ed |
src/qemu/qemu_process.c | 6 ++++++
|
|
|
6ae9ed |
1 file changed, 6 insertions(+)
|
|
|
6ae9ed |
|
|
|
6ae9ed |
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
|
6ae9ed |
index 9583506..0777c0c 100644
|
|
|
6ae9ed |
--- a/src/qemu/qemu_process.c
|
|
|
6ae9ed |
+++ b/src/qemu/qemu_process.c
|
|
|
6ae9ed |
@@ -4823,6 +4823,8 @@ qemuProcessSetupHotpluggableVcpus(virQEMUDriverPtr driver,
|
|
|
6ae9ed |
qemuDomainAsyncJob asyncJob)
|
|
|
6ae9ed |
{
|
|
|
6ae9ed |
unsigned int maxvcpus = virDomainDefGetVcpusMax(vm->def);
|
|
|
6ae9ed |
+ qemuDomainObjPrivatePtr priv = vm->privateData;
|
|
|
6ae9ed |
+ qemuCgroupEmulatorAllNodesDataPtr emulatorCgroup = NULL;
|
|
|
6ae9ed |
virDomainVcpuDefPtr vcpu;
|
|
|
6ae9ed |
qemuDomainVcpuPrivatePtr vcpupriv;
|
|
|
6ae9ed |
virJSONValuePtr vcpuprops = NULL;
|
|
|
6ae9ed |
@@ -4855,6 +4857,9 @@ qemuProcessSetupHotpluggableVcpus(virQEMUDriverPtr driver,
|
|
|
6ae9ed |
qsort(bootHotplug, nbootHotplug, sizeof(*bootHotplug),
|
|
|
6ae9ed |
qemuProcessVcpusSortOrder);
|
|
|
6ae9ed |
|
|
|
6ae9ed |
+ if (qemuCgroupEmulatorAllNodesAllow(priv->cgroup, &emulatorCgroup) < 0)
|
|
|
6ae9ed |
+ goto cleanup;
|
|
|
6ae9ed |
+
|
|
|
6ae9ed |
for (i = 0; i < nbootHotplug; i++) {
|
|
|
6ae9ed |
vcpu = bootHotplug[i];
|
|
|
6ae9ed |
|
|
|
6ae9ed |
@@ -4879,6 +4884,7 @@ qemuProcessSetupHotpluggableVcpus(virQEMUDriverPtr driver,
|
|
|
6ae9ed |
ret = 0;
|
|
|
6ae9ed |
|
|
|
6ae9ed |
cleanup:
|
|
|
6ae9ed |
+ qemuCgrouEmulatorAllNodesRestore(emulatorCgroup);
|
|
|
6ae9ed |
VIR_FREE(bootHotplug);
|
|
|
6ae9ed |
virJSONValueFree(vcpuprops);
|
|
|
6ae9ed |
return ret;
|
|
|
6ae9ed |
--
|
|
|
6ae9ed |
2.10.0
|
|
|
6ae9ed |
|