[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers proper
From: |
Zhangjie (HZ) |
Subject: |
Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly |
Date: |
Thu, 21 Aug 2014 15:37:36 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
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
- [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly, Jason Wang, 2014/08/19
- Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly, William Dauchy, 2014/08/20
- Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly, Zhangjie (HZ), 2014/08/20
- Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly, Jason Wang, 2014/08/21
- Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly, Zhangjie (HZ), 2014/08/21
- Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly, Jason Wang, 2014/08/21
- Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly, Zhangjie (HZ), 2014/08/21
- Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly, Michael S. Tsirkin, 2014/08/27
- Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly, Zhangjie (HZ), 2014/08/29
- Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly, Jason Wang, 2014/08/21
Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly, Michael S. Tsirkin, 2014/08/27