Re: [PATCH v8 09/18] qemu: Implement qemu driver for throttle API

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

 



On Wed, Feb 19, 2025 at 22:27:13 +0530, Harikumar Rajkumar wrote:
> From: Chun Feng Wu <danielwuwy@xxxxxxx>
> 
> ThrottleGroup lifecycle implementation, note, in QOM, throttlegroup name is prefixed with
> "throttle-" to clearly separate throttle group objects into their own namespace.
> * "qemuDomainSetThrottleGroup", this method is to add("object-add") or update("qom-set")
>   throttlegroup in QOM and update corresponding objects in DOM
> * "qemuDomainGetThrottleGroup", this method queries throttlegroup info by groupname
> * "qemuDomainDelThrottleGroup", this method checks if group is referenced by any throttle
>   in disks and delete it if it's not used anymore
> * Check flag "QEMU_CAPS_OBJECT_JSON" during qemuDomainSetThrottleGroup when vm is active,
>   throttle group feature requries such flag
> * "objectAddNoWrap"("props") check is done by reusing qemuMonitorAddObject in
>   qemuDomainSetThrottleGroup
> 
> Signed-off-by: Chun Feng Wu <danielwuwy@xxxxxxx>
> 
> * Apply suggested coding style changes.
> * cleanup qemu Get ThrottleGroup.
> * Update the version to 11.1.0.
> 
> Signed-off-by: Harikumar Rajkumar <harirajkumar230@xxxxxxxxx>
> ---
>  src/qemu/qemu_driver.c | 243 +++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 243 insertions(+)

[...]

> +    priv = vm->privateData;
> +    qemuCaps = priv->qemuCaps;
> +    if (virDomainObjIsActive(vm)) {
> +        if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_JSON)) {
> +            virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
> +                           _("This QEMU doesn't support throttle group creation"));
> +            return -1;
> +        }

While looking at this I noticed that QEMU_CAPS_OBJECT_JSON is no longer
needed as it's always present with qemu versions we currently support:

https://lists.libvirt.org/archives/list/devel@xxxxxxxxxxxxxxxxx/message/7ROU6X7QLFZ2UOHY23ZUZHDVKHZST6IV/

Once the patches are reviewed I'll rebase this on top and delete this.



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

  Powered by Linux