# Re: \[PATCH 1/6\] vhost: get rid of vhost\_poll\_flush() wrapper

- From: Mike Christie \<michael.christie@oracle.com\>
- Date: 2021-12-03 17:45:44 
- List: virtualization
- Page: https://ratatoskr.run/virtualization/2021/12/1595750
- Thread: https://ratatoskr.run/kvm/2021/11/1572407/t.md

```text
On 11/16/21 8:33 AM, Stefano Garzarella wrote:
> On Mon, Nov 15, 2021 at 06:29:58PM +0300, Andrey Ryabinin wrote:
>> vhost_poll_flush() is a simple wrapper around vhost_work_dev_flush().
>> It gives wrong impression that we are doing some work over vhost_poll,
>> while in fact it flushes vhost_poll->dev.
>> It only complicate understanding of the code and leads to mistakes
>> like flushing the same vhost_dev several times in a row.
>>
>> Just remove vhost_poll_flush() and call vhost_work_dev_flush() directly.
>>
>> Signed-off-by: Andrey Ryabinin <redacted>
>> ---
>> drivers/vhost/net.c   |  4 ++--
>> drivers/vhost/test.c  |  2 +-
>> drivers/vhost/vhost.c | 12 ++----------
>> drivers/vhost/vsock.c |  2 +-
>> 4 files changed, 6 insertions(+), 14 deletions(-)
> 
> Adding Mike since these changes could be relevant for "[PATCH V4 00/12] vhost: multiple worker support" [1] series.
> 
I reworked my patches to work with this set and it might make them
a little nicer, because I have less functions to port.

Andrey, please cc me when you repost and I'll send my patches over
your set, or if it's going to take you a while I can help you. I
handled the review comments for the flush related patches and I can
just post them.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
```
