Re: [PATCH V2 8/8] Use max bandwidth from qemuDomainObjPrivate struct when migrating

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

 



On Thu, Sep 01, 2011 at 02:42:57PM -0600, Jim Fehlig wrote:
> From: Jim Fehlig <jfehlig@xxxxxxxxxx>
> 
> Adjust qemuMigrationRun() to use migMaxBandwidth in qemuDomainObjPrivate
> structure when setting qemu migration speed.  Caller-specified 'resource'
> parameter overrides migMaxBandwidth.
> ---
>  src/qemu/qemu_migration.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index ab38579..503b844 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -1416,6 +1416,7 @@ qemuMigrationRun(struct qemud_driver *driver,
>      qemuMigrationCookiePtr mig = NULL;
>      qemuMigrationIOThreadPtr iothread = NULL;
>      int fd = -1;
> +    unsigned long migrate_speed = resource ? resource : priv->migMaxBandwidth;
>  
>      VIR_DEBUG("driver=%p, vm=%p, cookiein=%s, cookieinlen=%d, "
>                "cookieout=%p, cookieoutlen=%p, flags=%lx, resource=%lu, "
> @@ -1451,8 +1452,7 @@ qemuMigrationRun(struct qemud_driver *driver,
>                                         QEMU_ASYNC_JOB_MIGRATION_OUT) < 0)
>          goto cleanup;
>  
> -    if (resource > 0 &&
> -        qemuMonitorSetMigrationSpeed(priv->mon, resource) < 0) {
> +    if (qemuMonitorSetMigrationSpeed(priv->mon, migrate_speed) < 0) {
>          qemuDomainObjExitMonitorWithDriver(driver, vm);
>          goto cleanup;
>      }

  ACK, please push, I will try to make an rc3 thereafter,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

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