Thread (19 messages) flat view 19 messages, 6 authors, 2021-12-03

Re: [PATCH 1/6] vhost: get rid of vhost_poll_flush() wrapper

From: Andrey Ryabinin <hidden>
Date: 2021-11-19 10:28:42
Also in: kvm, lkml


On 11/16/21 5:41 PM, Stefano Garzarella wrote:
On Mon, Nov 15, 2021 at 06:29:58PM +0300, Andrey Ryabinin wrote:
quoted
void vhost_work_queue(struct vhost_dev *dev, struct vhost_work *work)
{
    if (!dev->worker)
@@ -663,7 +655,7 @@ void vhost_dev_stop(struct vhost_dev *dev)
    for (i = 0; i < dev->nvqs; ++i) {
        if (dev->vqs[i]->kick && dev->vqs[i]->handle_kick) {
            vhost_poll_stop(&dev->vqs[i]->poll);
-            vhost_poll_flush(&dev->vqs[i]->poll);
+            vhost_work_dev_flush(dev->vqs[i]->poll.dev);
Not related to this patch, but while looking at vhost-vsock I'm wondering if we can do the same here in vhost_dev_stop(), I mean move vhost_work_dev_flush() outside the loop and and call it once. (In another patch eventually)
Yeah, seems reasonable. I can't see any reason why would subsequent vhost_poll_stop() require the vhost_work_dev_flush() in between.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help