diff options
author | Jason Wang <jasowang@redhat.com> | 2012-05-02 11:42:54 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2012-05-02 18:22:25 +0300 |
commit | c70aa540c7a9f67add11ad3161096fb95233aa2e (patch) | |
tree | c02be13561a4a9347efd42cb6379950e5e277025 /drivers/vhost/vhost.c | |
parent | c8fb217af57c6c232af3517d3115d2af4ce9900e (diff) | |
download | op-kernel-dev-c70aa540c7a9f67add11ad3161096fb95233aa2e.zip op-kernel-dev-c70aa540c7a9f67add11ad3161096fb95233aa2e.tar.gz |
vhost: zerocopy: poll vq in zerocopy callback
We add used and signal guest in worker thread but did not poll the virtqueue
during the zero copy callback. This may lead the missing of adding and
signalling during zerocopy. Solve this by polling the virtqueue and let it
wakeup the worker during callback.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost/vhost.c')
-rw-r--r-- | 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 51e4c1e..94dbd25 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -1603,6 +1603,7 @@ void vhost_zerocopy_callback(struct ubuf_info *ubuf) struct vhost_ubuf_ref *ubufs = ubuf->ctx; 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); |