On Wed, 2012-05-16 at 18:14 +0300, Michael S. Tsirkin wrote: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:know indrivers/vhost/vhost.c | 1 +Doing so, we might have redundant vhost_poll_queue(). Do you
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 *arg)
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 */
vq->heads[ubuf->desc].len = VHOST_DMA_DONE_LEN;
kref_put(&ubufs->kref, vhost_zerocopy_done_signal);
duringwhich scenario there might be missing of adding and signalingnozerocopy?Yes, as we only do signaling and adding during tx work, if there'sguesttx
work when the skb were sent, we may lose the opportunity to let
unlessknow about the completion. It's easy to be reproduced with netperfThe reason which host signals guest is to free guest tx buffers, if
test.
there is no tx work, then it's not necessary to signal the guest
guest runs out of memory. The pending buffers will be released
virtio_net device gone.
It seems vhost_enable_notify is missing in somewhere else?IIRC guest networking seems to be lost.
What's the behavior of netperf test when you hit this situation?
Thanks
Shirley
Thanks
Shirley