Re: [PATCH v2 1/3] vduse: Pass management device pointer to vduse_dev_init_vdpa()

2022-05-15 Thread Greg KH
On Mon, May 16, 2022 at 02:03:40PM +0800, Xie Yongji wrote: > Pass management device pointer from vdpa_dev_add() to > vduse_dev_init_vdpa() rather than using the static > variable directly. > > No functional change. > > Signed-off-by: Xie Yongji > --- > drivers/vdpa/vdpa_user/vduse_dev.c | 9 ++

Re: [PATCH v2 3/3] Docs/ABI/testing: Add VDUSE sysfs interface ABI document

2022-05-15 Thread Greg KH
On Mon, May 16, 2022 at 02:03:42PM +0800, Xie Yongji wrote: > This adds missing documentation for VDUSE sysfs interface ABI > under Documentation/ABI/testing. > > Signed-off-by: Xie Yongji > --- > Documentation/ABI/testing/sysfs-class-vduse | 33 + > MAINTAINERS

Re: [PATCH v2 2/3] vdpa: Add a device object for vdpa management device

2022-05-15 Thread Greg KH
On Mon, May 16, 2022 at 02:03:41PM +0800, Xie Yongji wrote: > Introduce a device object for vdpa management device to control > its lifecycle. And the device name will be used to match > VDPA_ATTR_MGMTDEV_DEV_NAME field of netlink message rather than > using parent device name. > > With this patch

Re: [PATCH 0/3] trivial: Fix several compilation errors/warnings with GCC12

2022-05-15 Thread Davidlohr Bueso
Hello - What is the status of this? Currently gcc 12 (tumbleweed) is unable to build Linus' latest because of splats in the scheduler headers... Thanks, Davidlohr On Thu, 14 Apr 2022, Christophe de Dinechin wrote: Compiling with GCC 12 using defconfig generates a number of build errors due to

[PATCH V2 5/8] vhost_vsock: simplify vhost_vsock_flush()

2022-05-15 Thread Mike Christie
From: Andrey Ryabinin vhost_vsock_flush() calls vhost_work_dev_flush(vsock->vqs[i].poll.dev) before vhost_work_dev_flush(&vsock->dev). This seems pointless as vsock->vqs[i].poll.dev is the same as &vsock->dev and several flushes in a row doesn't do anything useful, one is just enough. Signed-off

[PATCH V2 7/8] vhost-test: drop flush after vhost_dev_cleanup

2022-05-15 Thread Mike Christie
The flush after vhost_dev_cleanup is not needed because: 1. It doesn't do anything. vhost_dev_cleanup will stop the worker thread so the flush call will just return since the worker has not device. 2. It's not needed. The comment about jobs re-queueing themselves does not look correct because han

[PATCH V2 8/8] vhost: rename vhost_work_dev_flush

2022-05-15 Thread Mike Christie
This patch renames vhost_work_dev_flush to just vhost_dev_flush to relfect that it flushes everything on the device and that drivers don't know/care that polls are based on vhost_works. Drivers just flush the entire device and polls, and works for vhost-scsi management TMFs and IO net virtqueues, e

[PATCH V2 6/8] vhost-scsi: drop flush after vhost_dev_cleanup

2022-05-15 Thread Mike Christie
The flush after vhost_dev_cleanup is not needed because: 1. It doesn't do anything. vhost_dev_cleanup will stop the worker thread so the flush call will just return since the worker has not device. 2. It's not needed for the re-queue case. vhost_scsi_evt_handle_kick grabs the mutex and if the bac

[PATCH V2 3/8] vhost_net: get rid of vhost_net_flush_vq() and extra flush calls

2022-05-15 Thread Mike Christie
From: Andrey Ryabinin vhost_net_flush_vq() calls vhost_work_dev_flush() twice passing vhost_dev pointer obtained via 'n->poll[index].dev' and 'n->vqs[index].vq.poll.dev'. This is actually the same pointer, initialized in vhost_net_open()/vhost_dev_init()/vhost_poll_init() Remove vhost_net_flush_

[PATCH V2 0/8] vhost flush cleanups

2022-05-15 Thread Mike Christie
The following patches are Andrey Ryabinin's flush cleanups and some from me. They reduce the number of flush calls and remove some bogus ones where we don't even have a worker running anymore or they were based on outdated or incorrect assumptions. Jason, for the patches you gave me an explicit ac

[PATCH V2 2/8] vhost: flush dev once during vhost_dev_stop

2022-05-15 Thread Mike Christie
When vhost_work_dev_flush returns all work queued at that time will have completed. There is then no need to flush after every vhost_poll_stop call, and we can move the flush call to after the loop that stops the pollers. Signed-off-by: Mike Christie --- drivers/vhost/vhost.c | 6 +++--- 1 file

[PATCH V2 4/8] vhost_test: remove vhost_test_flush_vq()

2022-05-15 Thread Mike Christie
From: Andrey Ryabinin vhost_test_flush_vq() just a simple wrapper around vhost_work_dev_flush() which seems have no value. It's just easier to call vhost_work_dev_flush() directly. Besides there is no point in obtaining vhost_dev pointer via 'n->vqs[index].poll.dev' while we can just use &n->dev.

[PATCH V2 1/8] vhost: get rid of vhost_poll_flush() wrapper

2022-05-15 Thread Mike Christie
From: Andrey Ryabinin 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 vh