lkml.org 
[lkml]   [2021]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/6] vhost: get rid of vhost_poll_flush() wrapper
From
Date


On 11/16/21 5:41 PM, Stefano Garzarella wrote:
> On Mon, Nov 15, 2021 at 06:29:58PM +0300, Andrey Ryabinin wrote:

>> 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.

\
 
 \ /
  Last update: 2021-11-19 11:28    [W:0.162 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site