mbox series

[v3,0/2] vhost-scsi: Support worker ioctls

Message ID 20231204231618.21962-1-michael.christie@oracle.com (mailing list archive)
Headers show
Series vhost-scsi: Support worker ioctls | expand

Message

Mike Christie Dec. 4, 2023, 11:16 p.m. UTC
The following patches allow users to configure the vhost worker threads
for vhost-scsi. With vhost-net we get a worker thread per rx/tx virtqueue
pair, but for vhost-scsi we get one worker for all workqueues. This
becomes a bottlneck after 2 queues are used.

In the upstream linux kernel commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/vhost/vhost.c?id=c1ecd8e9500797748ae4f79657971955d452d69d

we enabled the vhost layer to be able to create a worker thread and
attach it to a virtqueue.

This patchset adds support to vhost-scsi to use these ioctls so we are
no longer limited to the single worker.

v3:
- Warn user if they have set worker_per_virtqueue=true but the kernel
doesn't support it.
v2:
- Make config option a bool instead of an int.

Comments

Stefan Hajnoczi Dec. 5, 2023, 6:42 p.m. UTC | #1
On Mon, Dec 04, 2023 at 05:16:16PM -0600, Mike Christie wrote:
> The following patches allow users to configure the vhost worker threads
> for vhost-scsi. With vhost-net we get a worker thread per rx/tx virtqueue
> pair, but for vhost-scsi we get one worker for all workqueues. This
> becomes a bottlneck after 2 queues are used.
> 
> In the upstream linux kernel commit:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/vhost/vhost.c?id=c1ecd8e9500797748ae4f79657971955d452d69d
> 
> we enabled the vhost layer to be able to create a worker thread and
> attach it to a virtqueue.
> 
> This patchset adds support to vhost-scsi to use these ioctls so we are
> no longer limited to the single worker.
> 
> v3:
> - Warn user if they have set worker_per_virtqueue=true but the kernel
> doesn't support it.
> v2:
> - Make config option a bool instead of an int.
> 
> 

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>