[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH COLO-Frame v13 28/39] COLO: Process shutdown com
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH COLO-Frame v13 28/39] COLO: Process shutdown command for VM in COLO state |
Date: |
Tue, 26 Jan 2016 19:55:04 +0000 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
* zhanghailiang (address@hidden) wrote:
> If VM is in COLO FT state, we should do some extra work before normal shutdown
> process. SVM will ignore the shutdown command if this command is issued
> directly
> to it, PVM will send the shutdown command to SVM if it gets this command.
>
> Cc: Paolo Bonzini <address@hidden>
> Signed-off-by: zhanghailiang <address@hidden>
> Signed-off-by: Li Zhijian <address@hidden>
> ---
> v13:
> - Move COLO shutdown related codes to colo.c file (Dave's suggestion)
> diff --git a/migration/colo.c b/migration/colo.c
> index de01ade..2bea519 100644
> --- a/migration/colo.c
> +++ b/migration/colo.c
> @@ -248,6 +248,7 @@ static uint64_t colo_get_cmd_value(QEMUFile *f, uint32_t
> expect_cmd,
> static int colo_do_checkpoint_transaction(MigrationState *s,
> QEMUSizedBuffer *buffer)
> {
> + int colo_shutdown;
> QEMUFile *trans = NULL;
> size_t size;
> Error *local_err = NULL;
> @@ -277,6 +278,7 @@ static int colo_do_checkpoint_transaction(MigrationState
> *s,
> qemu_mutex_unlock_iothread();
> goto out;
> }
> + colo_shutdown = colo_shutdown_requested;
> vm_stop_force_state(RUN_STATE_COLO);
> qemu_mutex_unlock_iothread();
> trace_colo_vm_state_change("run", "stop");
> @@ -330,6 +332,18 @@ static int colo_do_checkpoint_transaction(MigrationState
> *s,
> goto out;
> }
>
> + if (colo_shutdown) {
Why do you take a copy of colo_shutdown_requested rather than just use
it directly?
Dave
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
- Re: [Qemu-devel] [PATCH COLO-Frame v13 28/39] COLO: Process shutdown command for VM in COLO state,
Dr. David Alan Gilbert <=