[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 05/10] vhost: poll support support multiple workers
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH 05/10] vhost: poll support support multiple workers |
Date: |
Tue, 17 Nov 2020 15:32:19 +0000 |
On Thu, Nov 12, 2020 at 05:19:05PM -0600, Mike Christie wrote:
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index d229515..9eeb8c7 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -187,13 +187,15 @@ void vhost_work_init(struct vhost_work *work,
> vhost_work_fn_t fn)
>
> /* Init poll structure */
> void vhost_poll_init(struct vhost_poll *poll, vhost_work_fn_t fn,
> - __poll_t mask, struct vhost_dev *dev)
> + __poll_t mask, struct vhost_dev *dev,
> + struct vhost_virtqueue *vq)
> {
> init_waitqueue_func_entry(&poll->wait, vhost_poll_wakeup);
> init_poll_funcptr(&poll->table, vhost_poll_func);
> poll->mask = mask;
> poll->dev = dev;
> poll->wqh = NULL;
> + poll->vq = vq;
>
> vhost_work_init(&poll->work, fn);
> }
Tying the poll mechanism to vqs rather than directly to vhost_worker
seems okay for now, but it might be necessary to change this later if
drivers want more flexibility about poll something that's not tied to a
vq or that uses worker 0.
Stefan
signature.asc
Description: PGP signature
- [PATCH 00/10] vhost/qemu: thread per IO SCSI vq, Mike Christie, 2020/11/12
- [PATCH 05/10] vhost: poll support support multiple workers, Mike Christie, 2020/11/12
- Re: [PATCH 05/10] vhost: poll support support multiple workers,
Stefan Hajnoczi <=
- [PATCH 08/10] vhost: move msg_handler to new ops struct, Mike Christie, 2020/11/12
- [PATCH 09/10] vhost: add VHOST_SET_VRING_ENABLE support, Mike Christie, 2020/11/12
- [PATCH 03/10] vhost poll: fix coding style, Mike Christie, 2020/11/12
- [PATCH 07/10] vhost, vhost-scsi: flush IO vqs then send TMF rsp, Mike Christie, 2020/11/12
- [PATCH 02/10] vhost scsi: remove extra flushes, Mike Christie, 2020/11/12