From: "Zhangjie (HZ)" <zhangjie14@huawei.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>,
qemu-devel@nongnu.org, William Dauchy <wdauchy@gmail.com>
Subject: Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly
Date: Thu, 21 Aug 2014 15:37:36 +0800 [thread overview]
Message-ID: <53F5A1C0.9000907@huawei.com> (raw)
In-Reply-To: <20140820212153.GA25585@redhat.com>
On 2014/8/21 5:21, Michael S. Tsirkin wrote:
> On Wed, Aug 20, 2014 at 12:18:33PM +0200, Michael S. Tsirkin wrote:
>>> Because of vhost_net_set_vq_index, VM can be start successfully.
>>> But, after about 80 times of migration under my environment, virtual nic became unreachable again.
>>> When I use jprobe to notify tap, the virtual nic becomes reachable again. This shows that interrupts missing causes
>>> the problem.
>>
>> Could you please clarify what do you mean by "notify tap" here?
>> Thanks!
>
> Or just post your jprobe script.
>
Ok, thanks, this is the key function.
static int cont =1;
static int virtnet_poll_jprobe(struct napi_struct *napi, int budget)
{
struct receive_queue *rq =
container_of(napi, struct receive_queue, napi);
struct virtnet_info *vi = rq->vq->vdev->priv;
struct send_queue *sq;
struct vring_virtqueue *vq;
int i;
if (cont == 1) {
for (i = 0; i < curr_queue_pairs; i++) {
sq = &vi->sq[i];
vq = to_vvq(sq->vq);
vq->notify(sq->vq);
}
cont = 0;
}
jprobe_return();
return 0;
}
When the problem occurs, one queue pair(each nic has two queue pairs) is active, so virtual nic can still receive skbs.
And, only one queue pair misses a interrupt.
To run the jprobe, some definition of function and structure should be copied to jprobe.c.
--
Best Wishes!
Zhang Jie
next prev parent reply other threads:[~2014-08-21 7:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-19 4:56 [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly Jason Wang
2014-08-20 9:02 ` William Dauchy
2014-08-20 9:23 ` Zhangjie (HZ)
2014-08-20 10:18 ` Michael S. Tsirkin
2014-08-20 21:21 ` Michael S. Tsirkin
2014-08-21 7:37 ` Zhangjie (HZ) [this message]
2014-08-21 4:29 ` Jason Wang
2014-08-21 6:28 ` Zhangjie (HZ)
2014-08-21 6:53 ` Jason Wang
2014-08-21 7:42 ` Zhangjie (HZ)
2014-08-27 12:59 ` Michael S. Tsirkin
2014-08-29 10:40 ` Zhangjie (HZ)
2014-09-01 8:18 ` Michael S. Tsirkin
2014-09-05 8:06 ` Zhangjie (HZ)
2014-08-22 2:56 ` Jason Wang
2014-08-27 11:54 ` Michael S. Tsirkin
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=53F5A1C0.9000907@huawei.com \
--to=zhangjie14@huawei.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wdauchy@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 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).