[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] migration: Guard ram_bytes_remaining against ea
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH] migration: Guard ram_bytes_remaining against early call |
Date: |
Tue, 19 Dec 2017 12:48:42 +0800 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Fri, Dec 15, 2017 at 11:51:23AM +0000, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <address@hidden>
>
> Calling ram_bytes_remaining during the early part of setup is unsafe
> because the ram_state isn't yet initialised.
>
> This can happen in the sequence:
> migrate
> migrate_cancel
> info migrate
>
> if the migrate sticks trying to connect (e.g. to an unresponsive
> destination due to the connect timeout). Here 'info migrate' sees
> a state of CANCELLING and so assumes the migrate has partially happened.
>
> partial fix for:
> RH bz: https://bugzilla.redhat.com/show_bug.cgi?id=1525899
> Reported-by: Xianxian Wang <address@hidden>
> Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Now we fetch this as long as !COMPLETE:
if (s->state != MIGRATION_STATUS_COMPLETED) {
info->ram->remaining = ram_bytes_remaining();
info->ram->dirty_pages_rate = ram_counters.dirty_pages_rate;
}
Maybe we should also narrow this down some day. Thanks,
--
Peter Xu