From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKMxG-0004Nu-K1 for qemu-devel@nongnu.org; Thu, 21 Aug 2014 03:38:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKMxA-0007F6-Ep for qemu-devel@nongnu.org; Thu, 21 Aug 2014 03:38:42 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:36441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKMx9-0007Cb-M2 for qemu-devel@nongnu.org; Thu, 21 Aug 2014 03:38:36 -0400 Message-ID: <53F5A1C0.9000907@huawei.com> Date: Thu, 21 Aug 2014 15:37:36 +0800 From: "Zhangjie (HZ)" MIME-Version: 1.0 References: <1408424189-10510-1-git-send-email-jasowang@redhat.com> <53F46909.2040101@huawei.com> <20140820101833.GA17371@redhat.com> <20140820212153.GA25585@redhat.com> In-Reply-To: <20140820212153.GA25585@redhat.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V3] vhost_net: start/stop guest notifiers properly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Jason Wang , qemu-devel@nongnu.org, William Dauchy 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