forked from pool/libvirt
64 lines
2.9 KiB
Diff
64 lines
2.9 KiB
Diff
|
commit 0471637d5628106d058f0eb5516ffa7d5285cc6f
|
||
|
Author: Martin Kletzander <mkletzan@redhat.com>
|
||
|
Date: Thu May 16 14:37:54 2013 +0200
|
||
|
|
||
|
qemu: Fix cgroup handling when setting VCPU BW
|
||
|
|
||
|
Commit 632f78c introduced a regression which causes schedinfo being
|
||
|
unable to set some parameters. When migrating to priv->cgroup there
|
||
|
was missing variable left out and due to passed NULL to underlying
|
||
|
function, the setting failed.
|
||
|
|
||
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=963592
|
||
|
|
||
|
Index: libvirt-1.0.5/src/qemu/qemu_driver.c
|
||
|
===================================================================
|
||
|
--- libvirt-1.0.5.orig/src/qemu/qemu_driver.c
|
||
|
+++ libvirt-1.0.5/src/qemu/qemu_driver.c
|
||
|
@@ -7721,7 +7721,6 @@ qemuDomainSetSchedulerParametersFlags(vi
|
||
|
{
|
||
|
virQEMUDriverPtr driver = dom->conn->privateData;
|
||
|
int i;
|
||
|
- virCgroupPtr group = NULL;
|
||
|
virDomainObjPtr vm = NULL;
|
||
|
virDomainDefPtr vmdef = NULL;
|
||
|
unsigned long long value_ul;
|
||
|
@@ -7799,7 +7798,7 @@ qemuDomainSetSchedulerParametersFlags(vi
|
||
|
QEMU_SCHED_MIN_PERIOD, QEMU_SCHED_MAX_PERIOD);
|
||
|
|
||
|
if (flags & VIR_DOMAIN_AFFECT_LIVE && value_ul) {
|
||
|
- if ((rc = qemuSetVcpusBWLive(vm, group, value_ul, 0)))
|
||
|
+ if ((rc = qemuSetVcpusBWLive(vm, priv->cgroup, value_ul, 0)))
|
||
|
goto cleanup;
|
||
|
|
||
|
vm->def->cputune.period = value_ul;
|
||
|
@@ -7813,7 +7812,7 @@ qemuDomainSetSchedulerParametersFlags(vi
|
||
|
QEMU_SCHED_MIN_QUOTA, QEMU_SCHED_MAX_QUOTA);
|
||
|
|
||
|
if (flags & VIR_DOMAIN_AFFECT_LIVE && value_l) {
|
||
|
- if ((rc = qemuSetVcpusBWLive(vm, group, 0, value_l)))
|
||
|
+ if ((rc = qemuSetVcpusBWLive(vm, priv->cgroup, 0, value_l)))
|
||
|
goto cleanup;
|
||
|
|
||
|
vm->def->cputune.quota = value_l;
|
||
|
@@ -7827,7 +7826,8 @@ qemuDomainSetSchedulerParametersFlags(vi
|
||
|
QEMU_SCHED_MIN_PERIOD, QEMU_SCHED_MAX_PERIOD);
|
||
|
|
||
|
if (flags & VIR_DOMAIN_AFFECT_LIVE && value_ul) {
|
||
|
- if ((rc = qemuSetEmulatorBandwidthLive(vm, group, value_ul, 0)))
|
||
|
+ if ((rc = qemuSetEmulatorBandwidthLive(vm, priv->cgroup,
|
||
|
+ value_ul, 0)))
|
||
|
goto cleanup;
|
||
|
|
||
|
vm->def->cputune.emulator_period = value_ul;
|
||
|
@@ -7841,7 +7841,8 @@ qemuDomainSetSchedulerParametersFlags(vi
|
||
|
QEMU_SCHED_MIN_QUOTA, QEMU_SCHED_MAX_QUOTA);
|
||
|
|
||
|
if (flags & VIR_DOMAIN_AFFECT_LIVE && value_l) {
|
||
|
- if ((rc = qemuSetEmulatorBandwidthLive(vm, group, 0, value_l)))
|
||
|
+ if ((rc = qemuSetEmulatorBandwidthLive(vm, priv->cgroup,
|
||
|
+ 0, value_l)))
|
||
|
goto cleanup;
|
||
|
|
||
|
vm->def->cputune.emulator_quota = value_l;
|