From: Wei Wang <wei.w.wang@intel.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com, quintela@redhat.com,
pbonzini@redhat.com, liliang.opensource@gmail.com,
yang.zhang.wz@gmail.com, quan.xu0@gmail.com, nilal@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 3/3] virtio-balloon: add a timer to limit the free page report waiting time
Date: Mon, 26 Feb 2018 12:35:31 +0800 [thread overview]
Message-ID: <5A938E93.5020502@intel.com> (raw)
In-Reply-To: <20180209121517.GD2428@work-vm>
On 02/09/2018 08:15 PM, Dr. David Alan Gilbert wrote:
> * Wei Wang (wei.w.wang@intel.com) wrote:
>> This patch adds a timer to limit the time that host waits for the free
>> page hints reported by the guest. Users can specify the time in ms via
>> "free-page-wait-time" command line option. If a user doesn't specify a
>> time, host waits till the guest finishes reporting all the free page
>> hints. The policy (wait for all the free page hints to be reported or
>> use a time limit) is determined by the orchestration layer.
> That's kind of a get-out; but there's at least two problems:
> a) With a timeout of 0 (the default) we might hang forever waiting
> for the guest; broken guests are just too common, we can't do
> that.
> b) Even if we were going to do that, you'd have to make sure that
> migrate_cancel provided a way out.
> c) How does that work during a savevm snapshot or when the guest is
> stopped?
> d) OK, the timer gives us some safety (except c); but how does the
> orchestration layer ever come up with a 'safe' value for it?
> Unless we can suggest a safe value that the orchestration layer
> can use, or a way they can work it out, then they just wont use
> it.
>
Hi Dave,
Sorry for my late response. Please see below:
a) I think people would just kill the guest if it is broken. We can also
change the default timeout value, for example 1 second, which is enough
for the free page reporting.
b) How about changing it this way: if timeout happens, host sends a stop
command to the guest, and makes virtio_balloon_poll_free_page_hints()
"return" immediately (without getting the guest's acknowledge). The
"return" basically goes back to the migration_thread function:
while (s->state == MIGRATION_STATUS_ACTIVE ||
s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE) {
...
}
migration_cancel sets the state to MIGRATION_CANCELLING, so it will stop
the migration process.
c) This optimization needs the guest to report. If the guest is stopped,
it wouldn't work. How about adding a check of "RUN_STATE" before going
into the optimization?
d) Yes. Normally it is faster to wait for the guest to report all the
free pages. Probably, we can just hardcode a value (e.g. 1s) for now
(instead of making it configurable by users), this is used to handle the
case that the guest is broken. What would you think?
Best,
Wei
next prev parent reply other threads:[~2018-02-26 4:32 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-06 11:08 [virtio-dev] [PATCH v2 0/3] virtio-balloon: free page hint reporting support Wei Wang
2018-02-06 11:08 ` [Qemu-devel] " Wei Wang
2018-02-06 11:08 ` [virtio-dev] [PATCH v2 1/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT Wei Wang
2018-02-06 11:08 ` [Qemu-devel] " Wei Wang
2018-02-07 1:04 ` [virtio-dev] " Michael S. Tsirkin
2018-02-07 1:04 ` [Qemu-devel] " Michael S. Tsirkin
2018-03-02 9:32 ` [virtio-dev] " Wei Wang
2018-03-02 9:32 ` [Qemu-devel] " Wei Wang
2018-02-09 12:06 ` Dr. David Alan Gilbert
2018-02-06 11:08 ` [virtio-dev] [PATCH v2 2/3] migration: use the free page reporting feature from balloon Wei Wang
2018-02-06 11:08 ` [Qemu-devel] " Wei Wang
2018-02-06 23:57 ` [virtio-dev] " Michael S. Tsirkin
2018-02-06 23:57 ` [Qemu-devel] " Michael S. Tsirkin
2018-02-08 3:54 ` [virtio-dev] " Wei Wang
2018-02-08 3:54 ` [Qemu-devel] " Wei Wang
2018-02-09 11:50 ` Dr. David Alan Gilbert
2018-02-26 5:07 ` Wei Wang
2018-02-26 9:22 ` Wang, Wei W
2018-02-06 11:08 ` [virtio-dev] [PATCH v2 3/3] virtio-balloon: add a timer to limit the free page report waiting time Wei Wang
2018-02-06 11:08 ` [Qemu-devel] " Wei Wang
2018-02-06 23:43 ` [virtio-dev] " Michael S. Tsirkin
2018-02-06 23:43 ` [Qemu-devel] " Michael S. Tsirkin
2018-02-09 12:15 ` Dr. David Alan Gilbert
2018-02-26 4:35 ` Wei Wang [this message]
2018-02-27 0:50 ` Michael S. Tsirkin
2018-02-27 10:10 ` Wei Wang
2018-02-27 13:08 ` Liang Li
2018-02-28 10:33 ` Wei Wang
2018-02-27 10:34 ` Dr. David Alan Gilbert
2018-02-28 10:37 ` Wei Wang
2018-02-07 0:02 ` [virtio-dev] Re: [PATCH v2 0/3] virtio-balloon: free page hint reporting support Michael S. Tsirkin
2018-02-07 0:02 ` [Qemu-devel] " Michael S. Tsirkin
2018-02-08 5:38 ` [virtio-dev] " Wei Wang
2018-02-08 5:38 ` [Qemu-devel] " Wei Wang
2018-02-08 20:15 ` Dr. David Alan Gilbert
2018-02-09 3:10 ` [virtio-dev] " Wei Wang
2018-02-09 3:10 ` [Qemu-devel] " Wei Wang
2018-02-09 10:53 ` Dr. David Alan Gilbert
2018-02-26 4:42 ` [virtio-dev] " Wei Wang
2018-02-26 4:42 ` [Qemu-devel] " Wei Wang
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=5A938E93.5020502@intel.com \
--to=wei.w.wang@intel.com \
--cc=dgilbert@redhat.com \
--cc=liliang.opensource@gmail.com \
--cc=mst@redhat.com \
--cc=nilal@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quan.xu0@gmail.com \
--cc=quintela@redhat.com \
--cc=yang.zhang.wz@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.