qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() proc


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping
Date: Tue, 26 Nov 2013 12:32:05 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

Il 21/11/2013 10:11, Lei Li ha scritto:
> Signed-off-by: Lei Li <address@hidden>
> ---
>  migration.c |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/migration.c b/migration.c
> index 4ac466b..0f98ac1 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -579,10 +579,11 @@ static void *migration_thread(void *opaque)
>              pending_size = qemu_savevm_state_pending(s->file, max_size);
>              DPRINTF("pending size %" PRIu64 " max %" PRIu64 "\n",
>                      pending_size, max_size);
> -            if (pending_size && pending_size >= max_size) {
> +            if (pending_size && pending_size >= max_size &&
> +                !runstate_needs_reset()) {
>                  qemu_savevm_state_iterate(s->file);

I'm not sure why you need this.

>              } else {
> -                int ret;
> +                int ret = 0;
>  
>                  DPRINTF("done iterating\n");
>                  qemu_mutex_lock_iothread();
> @@ -590,7 +591,10 @@ static void *migration_thread(void *opaque)
>                  qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
>                  old_vm_running = runstate_is_running();
>  
> -                ret = vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
> +                if (!runstate_needs_reset()) {
> +                    ret = vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
> +                }

This however is okay.

Paolo

>                  if (ret >= 0) {
>                      qemu_file_set_rate_limit(s->file, INT_MAX);
>                      qemu_savevm_state_complete(s->file);
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]