From: Qin Chuanyu <qinchuanyu@huawei.com>
To: Anthony Liguori <anthony@codemonkey.ws>,
"Michael S. Tsirkin" <mst@redhat.com>, <jasowang@redhat.com>,
Wei Liu <wei.liu2@citrix.com>
Cc: KVM list <kvm@vger.kernel.org>, <netdev@vger.kernel.org>,
<qianhuibin@huawei.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
<wangfuhai@huawei.com>, <liuyongan@huawei.com>
Subject: Re: Is fallback vhost_net to qemu for live migrate available?
Date: Mon, 14 Oct 2013 16:19:57 +0800 [thread overview]
Message-ID: <525BA92D.6050609@huawei.com> (raw)
In-Reply-To: <CA+aC4kv66bvt5mREv-YXVddD9wdgAiT=heo9xhdkkVmuLOyrBw@mail.gmail.com>
On 2013/8/30 0:08, Anthony Liguori wrote:
> Hi Qin,
>
> KVM and Xen represent memory in a very different way. KVM can only
> track when guest mode code dirties memory. It relies on QEMU to track
> when guest memory is dirtied by QEMU. Since vhost is running outside
> of QEMU, vhost also needs to tell QEMU when it has dirtied memory.
>
> I don't think this is a problem with Xen though. I believe (although
> could be wrong) that Xen is able to track when either the domain or
> dom0 dirties memory.
>
> So I think you can simply ignore the dirty logging with vhost and it
> should Just Work.
>
Xen track guest's memory when live migrating as what KVM did (I guess it
rely on EPT),it couldn't mark dom0's dirty memory automatically.
I did the same dirty log with vhost_net but instead of KVM's api with
Xen's dirty memory interface,then live migration work.
--------------------------------------------------------------------
There is a bug on the Xen live migration when using qemu emulate
nic(such as virtio_net).
current flow:
xc_save->dirty memory copy->suspend->stop_vcpu->last memory copy
stop_qemu->stop_virtio_net
save_qemu->save_virtio_net
it means virtio_net would dirty memory after the last memory copy.
I have test it both vhost_on_qemu and virtio_net in qemu,there are same
problem, the update of vring_index would be mistake and lead network
unreachable. my solution is:
xc_save->dirty memory copy->suspend->stop_vcpu->stop_qemu
->stop_virtio_net->last memory copy
save_qemu->save_virtio_net
Xen's netfront and netback disconnect and flush IO-ring when live
migrate,so it is OK.
next prev parent reply other threads:[~2013-10-14 8:19 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-27 3:32 Is fallback vhost_net to qemu for live migrate available? Qin Chuanyu
2013-08-27 4:19 ` Michael S. Tsirkin
2013-08-27 7:04 ` Qin Chuanyu
2013-08-27 7:16 ` Michael S. Tsirkin
2013-08-27 7:22 ` Qin Chuanyu
2013-08-27 9:41 ` Wei Liu
2013-08-29 16:08 ` Anthony Liguori
2013-08-31 4:45 ` Qin Chuanyu
2013-09-02 3:19 ` Jason Wang
2013-09-02 3:19 ` Jason Wang
2013-09-02 7:57 ` Wei Liu
2013-09-02 8:11 ` Michael S. Tsirkin
2013-09-02 8:11 ` Michael S. Tsirkin
2013-09-03 1:28 ` Qin Chuanyu
2013-09-03 8:40 ` Wei Liu
2013-09-03 8:40 ` Wei Liu
2013-09-03 8:55 ` Michael S. Tsirkin
2013-09-03 8:55 ` Michael S. Tsirkin
2013-09-03 9:15 ` Wei Liu
2013-09-03 9:15 ` Wei Liu
2013-09-05 13:33 ` [Xen-devel] " Stefano Stabellini
2013-09-05 13:33 ` Stefano Stabellini
2013-09-03 1:28 ` Qin Chuanyu
2013-09-02 7:57 ` Wei Liu
2013-08-31 4:45 ` Qin Chuanyu
2013-10-14 8:19 ` Qin Chuanyu
2013-10-14 8:19 ` Qin Chuanyu [this message]
2013-08-29 16:08 ` Anthony Liguori
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=525BA92D.6050609@huawei.com \
--to=qinchuanyu@huawei.com \
--cc=anthony@codemonkey.ws \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=liuyongan@huawei.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=qianhuibin@huawei.com \
--cc=wangfuhai@huawei.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/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.