public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Qin Chuanyu <qinchuanyu@huawei•com>
To: Anthony Liguori <anthony@codemonkey•ws>
Cc: "Michael S. Tsirkin" <mst@redhat•com>, <jasowang@redhat•com>,
	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>, <likunyun@huawei•com>,
	<liuyongan@huawei•com>, <liuyingdong@huawei•com>
Subject: Re: Is fallback vhost_net to qemu for live migrate available?
Date: Sat, 31 Aug 2013 12:45:11 +0800	[thread overview]
Message-ID: <522174D7.6080903@huawei.com> (raw)
In-Reply-To: <CA+aC4kv66bvt5mREv-YXVddD9wdgAiT=heo9xhdkkVmuLOyrBw@mail.gmail.com>

On 2013/8/30 0:08, Anthony Liguori wrote:
> Hi Qin,

>> By change the memory copy and notify mechanism ,currently virtio-net with
>> vhost_net could run on Xen with good performance。
>
> I think the key in doing this would be to implement a property
> ioeventfd and irqfd interface in the driver domain kernel.  Just
> hacking vhost_net with Xen specific knowledge would be pretty nasty
> IMHO.
>
Yes, I add a kernel module which persist virtio-net pio_addr and msix 
address as what kvm module did. Guest wake up vhost thread by adding a 
hook func in evtchn_interrupt.

> Did you modify the front end driver to do grant table mapping or is
> this all being done by mapping the domain's memory?
>
There is nothing changed in front end driver. Currently I use 
alloc_vm_area to get address space, and map the domain's memory as what 
what qemu did.

> 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.
>
Thanks for your advice, I have tried it, without ping, it could migrate 
successfully, but if there has skb been received, domU would crash. I 
guess that because though Xen track domU memory, but it could only track 
memory that changed in DomU. memory changed by Dom0 is out of control.

>
> No, we don't have a mechanism to fallback  to QEMU for the datapath.
> It would be possible but I think it's a bad idea to mix and match the
> two.
>
Next I would try to fallback datapath to qemu for three reason:
1: memory translate mechanism has been changed for vhost_net on Xen,so 
there would be some necessary changed needed for vhost_log in kernel.

2: I also maped IOREQ_PFN page(which is used for communication between 
qemu and Xen) in kernel notify module, so it also needed been marked as 
dirty when tx/rx exist in migrate period.

3: Most important of all, Michael S. Tsirkin said that he hadn't 
considered about vhost_net migrate on Xen,so there would be some 
changed needed in vhost_log for qemu.

fallback to qemu seems to much easier, isn't it.

Regards
Qin chuanyu

  reply	other threads:[~2013-08-31  4:45 UTC|newest]

Thread overview: 17+ 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 [this message]
2013-09-02  3:19     ` Jason Wang
2013-09-02  7:57     ` Wei Liu
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:55           ` Michael S. Tsirkin
2013-09-03  9:15             ` Wei Liu
2013-09-05 13:33             ` [Xen-devel] " Stefano Stabellini
2013-10-14  8:19   ` Qin Chuanyu

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=522174D7.6080903@huawei.com \
    --to=qinchuanyu@huawei$(echo .)com \
    --cc=anthony@codemonkey$(echo .)ws \
    --cc=jasowang@redhat$(echo .)com \
    --cc=kvm@vger$(echo .)kernel.org \
    --cc=likunyun@huawei$(echo .)com \
    --cc=liuyingdong@huawei$(echo .)com \
    --cc=liuyongan@huawei$(echo .)com \
    --cc=mst@redhat$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=qianhuibin@huawei$(echo .)com \
    --cc=wangfuhai@huawei$(echo .)com \
    --cc=xen-devel@lists$(echo .)xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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