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

Re: [libvirt] [PATCH] qemu_migration: Move waiting for SPICE migration



On Mon, Jun 10, 2013 at 16:33:52 +0200, Michal Privoznik wrote:
> Currently, we wait for SPICE to migrate in the very same loop where we
> wait for qemu to migrate. This has a disadvantage of slowing seamless
> migration down. One one hand, we should not kill the domain until all
> SPICE data has been migrated.  On the other hand, there is no need to
> wait in the very same loop and hence slowing down 'cont' on the
> destination. For instance, if users are watching a movie, they can
> experience the movie to be stopped for a couple of seconds, as
> processors are not running nor on src nor on dst as libvirt waits for
> SPICE to migrate. We should move the waiting phase to migration CONFIRM
> phase.
> ---
>  src/qemu/qemu_migration.c | 57 ++++++++++++++++++++++++++++++++---------------
>  1 file changed, 39 insertions(+), 18 deletions(-)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index ca79bc2..1d65df5 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -1582,6 +1582,40 @@ cleanup:
>      return ret;
>  }
>  
> +static int
> +qemuMigrationWaitForSpice(virQEMUDriverPtr driver,
> +                          virDomainObjPtr vm)
> +{
> +    qemuDomainObjPrivatePtr priv = vm->privateData;
> +    bool wait_for_spice = false;
> +    bool spice_migrated = false;
> +
> +    if (vm->def->ngraphics == 1 &&
> +        vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE &&
> +        virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SEAMLESS_MIGRATION))
> +        wait_for_spice = true;

Hmm, seamless migration won't apparently work if more than one graphics
is used at the same time (e.g., vnc and spice). But this patch just
matches what we had before. ACK.

Jirka


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