public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Zhangjie (HZ)" <zhangjie14@huawei.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, <kvm@vger.kernel.org>
Cc: <jasowang@redhat.com>, <qinchuanyu@huawei.com>,
	<liuyongan@huawei.com>, <davem@davemloft.net>,
	<zhangjie14@huawei.com>
Subject: Query: Is it possible  to lose interrupts between vhost and virtio_net during migration?
Date: Fri, 1 Aug 2014 10:17:51 +0800	[thread overview]
Message-ID: <53DAF8CF.4010704@huawei.com> (raw)
In-Reply-To: <20140731143725.GA3875@redhat.com>

Thanks,MST! :-)
I will change the order back and have a test again.

On 2014/7/31 22:37, Michael S. Tsirkin wrote:
> On Thu, Jul 31, 2014 at 04:31:00PM +0200, Michael S. Tsirkin wrote:
>> On Thu, Jul 31, 2014 at 07:47:24PM +0800, Zhangjie (HZ) wrote:
>>> [The test scenario]:
>>>
>>> Doing migration between two Hosts roundly(A->B, B->A) ,after about 20 times, network of the VM is unreachable.
>>> There are other 20 VMs in each Host, and they send ipv4 or ipv6 and multicast packets to each other.
>>> Sometimes the CPU idle of the Host maybe 0;
>>>
>>> [Problem description]:
>>>
>>> I wonder if it was interrupts missing that cause the network unreachable.
>>> In the migration process of kvm, source end should suspend, which include steps as follows:
>>> 1.	do_vm_stop->pause_all_vcpus
>>> 2.	vm_state_notify-> vhost_net_stop->set_guest_notifiers->kvm_virtio_pci_vq_vector_release
>>> 3.	vm_state_notify-> vhost_net_stop-> vhost_net_stop_one->OST_NET_SET_BACKEND-> vhost_net_flush_vq-> vhost_work_flush
>>> This may cause interrupts missing. Supose the scene that, virtqueue_notify() is called in virtio_net,
>>> then the VM is paused. And, just before the portiowrite being handled, eventfd of kvm is released.
>>> Then, vhost could not sense the notify, and the tx notify is lost.
>>> On the other side, if eventfd of kvm is released just after vhost_notify(), and before eventfd_signal(), then rx signal by vhost is lost.
>>
>> Could be a bug in userspace: should should cleanups notifiers
>> after it stops vhost.
>>
>> Could you please send this to appropriate mailing lists?
>> I have a policy against off-list discussions.
> 
> Also, Jason, could you take a look please?
> Looks like your patch a9f98bb5ebe6fb1869321dcc58e72041ae626ad8
> changed the order of stopping the device.
> Previously vhost_dev_stop would disable backend and only afterwards,
> unset guest notifiers.  You now unset guest notifiers while vhost is still
> active. Looks like this can lose events?
> 
> 
> 
>> -- 
>> MST
> .
> 

-- 
Best Wishes!
Zhang Jie


       reply	other threads:[~2014-08-01  2:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <53DA2CCC.1040606@huawei.com>
     [not found] ` <20140731143100.GA3834@redhat.com>
     [not found]   ` <20140731143725.GA3875@redhat.com>
2014-08-01  2:17     ` Zhangjie (HZ) [this message]
     [not found]     ` <53DB705F.2000405@redhat.com>
     [not found]       ` <53DB76A9.8010305@redhat.com>
     [not found]         ` <53E079C8.7050700@huawei.com>
     [not found]           ` <20140805094957.GB24619@redhat.com>
2014-08-05 12:14             ` Query: Is it possible to lose interrupts between vhost and virtio_net during migration? Zhangjie (HZ)
2014-08-07 12:47               ` Zhangjie (HZ)
2014-08-14  8:52                 ` Jason Wang
2014-08-14 10:02                   ` Michael S. Tsirkin
2014-08-15  2:55                     ` Jason Wang
2014-08-17 10:22                       ` Michael S. Tsirkin
2014-08-18  5:23                         ` Jason 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=53DAF8CF.4010704@huawei.com \
    --to=zhangjie14@huawei.com \
    --cc=davem@davemloft.net \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=liuyongan@huawei.com \
    --cc=mst@redhat.com \
    --cc=qinchuanyu@huawei.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