From: Peter Xu <peterx@redhat.com>
To: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
Cc: qemu-devel@nongnu.org, quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH] migration: Guard ram_bytes_remaining against early call
Date: Tue, 19 Dec 2017 12:48:42 +0800 [thread overview]
Message-ID: <20171219044842.GY22308@xz-mi> (raw)
In-Reply-To: <20171215115123.12959-1-dgilbert@redhat.com>
On Fri, Dec 15, 2017 at 11:51:23AM +0000, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> 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 <xianwang@redhat.com>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
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
next prev parent reply other threads:[~2017-12-19 4:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-15 11:51 [Qemu-devel] [PATCH] migration: Guard ram_bytes_remaining against early call Dr. David Alan Gilbert (git)
2017-12-19 4:48 ` Peter Xu [this message]
2017-12-27 22:14 ` Juan Quintela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171219044842.GY22308@xz-mi \
--to=peterx@redhat.com \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).