On Wed, 2012-05-16 at 21:36 +0300, Michael S. Tsirkin wrote:On Wed, May 16, 2012 at 10:32:05AM -0700, Shirley Ma wrote:I looked at the code, if (zerocopy) check is needed for below code:On Wed, 2012-05-16 at 18:14 +0300, Michael S. Tsirkin wrote:*arg)On Wed, May 16, 2012 at 08:10:27AM -0700, Shirley Ma wrote:On Wed, 2012-05-16 at 10:58 +0800, Jason Wang wrote:drivers/vhost/vhost.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 947f00d..7b75fdf 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -1604,6 +1604,7 @@ void vhost_zerocopy_callback(void
*/struct vhost_ubuf_ref *ubufs = ubuf->arg;
struct vhost_virtqueue *vq = ubufs->vq;
+ vhost_poll_queue(&vq->poll);
/* set len = 1 to mark this desc buffers done DMA
vhost_zerocopy_done_signal);vq->heads[ubuf->desc].len = VHOST_DMA_DONE_LEN;
kref_put(&ubufs->kref,
signalingknow inDoing so, we might have redundant vhost_poll_queue(). Do youwhich scenario there might be missing of adding andthere'sduringzerocopy?Yes, as we only do signaling and adding during tx work, ifletnotx
work when the skb were sent, we may lose the opportunity to
netperfguestknow about the completion. It's easy to be reproduced withiftest.The reason which host signals guest is to free guest tx buffers,Donnu. I see virtio sending packets but they do not getIt seems vhost_enable_notify is missing in somewhere else?there is no tx work, then it's not necessary to signal the guestunlessguest runs out of memory. The pending buffers will be releasedIIRC guest networking seems to be lost.
virtio_net device gone.
What's the behavior of netperf test when you hit this situation?
Thanks
Shirley
Thanks
Shirley
to tun on host. debugging.
+ if (zerocopy) {
num_pends = likely(vq->upend_idx>= vq->done_idx) ?
(vq->upend_idx - vq->done_idx) :
(vq->upend_idx + UIO_MAXIOV - vq->done_idx);
if (unlikely(num_pends> VHOST_MAX_PEND)) {
tx_poll_start(net, sock);
vhost_poll_queue
set_bit(SOCK_ASYNC_NOSPACE,&sock->flags);
break;
}
+ }
if (unlikely(vhost_enable_notify(&net->dev, vq))) {
vhost_disable_notify(&net->dev, vq);
continue;
}
break;
Second, whether it's possible the problem comes from tx_poll_start()? In
some situation, vhost_poll_wakeup() is not being called?
Thanks
Shirley
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html