mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
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
This commit is contained in:
parent
a842df78ea
commit
0471637d56
@ -8009,7 +8009,6 @@ qemuDomainSetSchedulerParametersFlags(virDomainPtr dom,
|
||||
{
|
||||
virQEMUDriverPtr driver = dom->conn->privateData;
|
||||
int i;
|
||||
virCgroupPtr group = NULL;
|
||||
virDomainObjPtr vm = NULL;
|
||||
virDomainDefPtr vmdef = NULL;
|
||||
unsigned long long value_ul;
|
||||
@ -8087,7 +8086,7 @@ qemuDomainSetSchedulerParametersFlags(virDomainPtr dom,
|
||||
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;
|
||||
@ -8101,7 +8100,7 @@ qemuDomainSetSchedulerParametersFlags(virDomainPtr dom,
|
||||
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;
|
||||
@ -8115,7 +8114,8 @@ qemuDomainSetSchedulerParametersFlags(virDomainPtr dom,
|
||||
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;
|
||||
@ -8129,7 +8129,8 @@ qemuDomainSetSchedulerParametersFlags(virDomainPtr dom,
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user