Re: [PATCH] qemu: fix not update weight in def after success

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

 




On 08/19/2015 01:32 AM, John Ferlan wrote:

On 08/12/2015 09:53 PM, Luyao Huang wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1253107

Update the weight in vm def to fix this.

Signed-off-by: Luyao Huang <lhuang@xxxxxxxxxx>
---
  src/qemu/qemu_driver.c | 2 ++
  1 file changed, 2 insertions(+)

Considering the series I recently ACK from Martin - shouldn't this to
make a virCgroupGetBlkioWeight type call to ensure you get/save whatever
the kernel saved?

Indeed, it will be better to check the value again (blkio.weigh and blkio.weight_device range is [10, 1000] right now, so seems these 2 value won't hit the issue that was fixed by Martin), i will write a new version later.

Thanks a lot for your review.

John

Luyao

See:

http://www.redhat.com/archives/libvir-list/2015-August/msg00065.html
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 7a984a8..0b984dc 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -9170,6 +9170,8 @@ qemuDomainSetBlkioParameters(virDomainPtr dom,
              if (STREQ(param->field, VIR_DOMAIN_BLKIO_WEIGHT)) {
                  if (virCgroupSetBlkioWeight(priv->cgroup, param->value.ui) < 0)
                      ret = -1;
+                else
+                    def->blkio.weight = param->value.ui;
              } else if (STREQ(param->field, VIR_DOMAIN_BLKIO_DEVICE_WEIGHT) ||
                         STREQ(param->field, VIR_DOMAIN_BLKIO_DEVICE_READ_IOPS) ||
                         STREQ(param->field, VIR_DOMAIN_BLKIO_DEVICE_WRITE_IOPS) ||


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