[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/41] migration: always use vm_stop_force_state
From: |
Orit Wasserman |
Subject: |
Re: [Qemu-devel] [PATCH 02/41] migration: always use vm_stop_force_state |
Date: |
Mon, 18 Feb 2013 11:07:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 02/15/2013 07:46 PM, Paolo Bonzini wrote:
> vm_stop_force_state does:
>
> if (runstate_is_running()) {
> vm_stop(state);
> } else {
> runstate_set(state);
> }
>
> migration.c does:
>
> if (runstate_is_running()) {
> vm_stop(state);
> } else {
> vm_stop_force_state(state);
> }
>
> The code run is the same even if we always use vm_stop_force_state in
> migration.c.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> migration.c | 6 +-----
> 1 files changed, 1 insertions(+), 5 deletions(-)
>
> diff --git a/migration.c b/migration.c
> index 5414060..2b44268 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -698,11 +698,7 @@ static void *buffered_file_thread(void *opaque)
> DPRINTF("done iterating\n");
> start_time = qemu_get_clock_ms(rt_clock);
> qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
> - if (old_vm_running) {
> - vm_stop(RUN_STATE_FINISH_MIGRATE);
> - } else {
> - vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
> - }
> + vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
> ret = qemu_savevm_state_complete(s->file);
> if (ret < 0) {
> qemu_mutex_unlock_iothread();
>
Reviewed-by: Orit Wasserman <address@hidden>
- [Qemu-devel] [PATCH 00/41] Migration cleanups and latency improvements, Paolo Bonzini, 2013/02/15
- [Qemu-devel] [PATCH 01/41] migration: simplify while loop, Paolo Bonzini, 2013/02/15
- [Qemu-devel] [PATCH 02/41] migration: always use vm_stop_force_state, Paolo Bonzini, 2013/02/15
- [Qemu-devel] [PATCH 03/41] migration: move more error handling to migrate_fd_cleanup, Paolo Bonzini, 2013/02/15
- [Qemu-devel] [PATCH 04/41] migration: push qemu_savevm_state_cancel out of qemu_savevm_state_*, Paolo Bonzini, 2013/02/15
- [Qemu-devel] [PATCH 05/41] block-migration: remove useless calls to blk_mig_cleanup, Paolo Bonzini, 2013/02/15