Displaying 7 results from an estimated 7 matches for "vhost_vq_work_queue".
2023 Mar 28
12
[PATCH v6 00/11] vhost: multiple worker support
The following patches were built over linux-next which contains various
vhost patches in mst's tree and the vhost_task patchset in Christian
Brauner's tree:
git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
kernel.user_worker branch:
https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/log/?h=kernel.user_worker
The latter patchset handles the review comment
2018 Nov 03
0
[PATCH 1/1] Add vhost_blk driver
...save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=mips
All error/warnings (new ones prefixed by >>):
drivers/vhost/blk.c: In function 'vhost_blk_iocb_complete':
>> drivers/vhost/blk.c:129:2: error: implicit declaration of function 'vhost_vq_work_queue'; did you mean 'vhost_work_queue'? [-Werror=implicit-function-declaration]
vhost_vq_work_queue(&req->q->vq, &req->q->w);
^~~~~~~~~~~~~~~~~~~
vhost_work_queue
In file included from include/linux/kernel.h:14:0,
from include/linux/l...
2023 Mar 28
1
[PATCH v6 04/11] vhost: take worker or vq instead of dev for flushing
...init(&flush.work, vhost_flush_work);
+
+ vhost_work_queue_on(worker, &flush.work);
+ wait_for_completion(&flush.wait_event);
+}
+
void vhost_work_queue(struct vhost_dev *dev, struct vhost_work *work)
{
vhost_work_queue_on(dev->worker, work);
@@ -261,15 +275,7 @@ EXPORT_SYMBOL_GPL(vhost_vq_work_queue);
void vhost_dev_flush(struct vhost_dev *dev)
{
- struct vhost_flush_struct flush;
-
- if (dev->worker) {
- init_completion(&flush.wait_event);
- vhost_work_init(&flush.work, vhost_flush_work);
-
- vhost_work_queue(dev, &flush.work);
- wait_for_completion(&flush.wait_even...
2023 Jul 03
1
[GIT PULL] virtio: features, fixes, cleanups
...orker
vhost: add vhost_worker pointer to vhost_virtqueue
vhost, vhost_net: add helper to check if vq has work
vhost: take worker or vq instead of dev for queueing
vhost: take worker or vq for flushing
vhost: convert poll work to be vq based
vhost_sock: convert to vhost_vq_work_queue
vhost_scsi: make SCSI cmd completion per vq
vhost_scsi: convert to vhost_vq_work_queue
vhost_scsi: flush IO vqs then send TMF rsp
vhost: remove vhost_work_queue
vhost: add helper to parse userspace vring state/file
vhost: replace single worker pointer with xarray...
2018 Nov 05
0
[PATCH 1/1] vhost: add per-vq worker thread
...r)) {
> + int ret = PTR_ERR(vq->worker);
> +
> + pr_err("%s: can't create vq worker: %d\n", __func__,
> + ret);
> + vq->worker = NULL;
> + return ret;
> + }
> + }
> + vhost_work_init(&vq->work, vhost_vq_poll_start_work);
> + vhost_vq_work_queue(vq, &vq->work);
> + return 0;
> +}
> +
I wonder whether or not it's better to allow the device to specific the
worker here instead of forcing a per vq worker model. Then we can keep
the behavior of exist implementation and do optimization on top?
Thanks
2023 Mar 28
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...22 ++++
include/uapi/linux/vhost_types.h | 15 +++
4 files changed, 204 insertions(+), 14 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 1fa5e9a49092..e40699e83c6d 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -271,7 +271,11 @@ EXPORT_SYMBOL_GPL(vhost_vq_work_queue);
void vhost_dev_flush(struct vhost_dev *dev)
{
- vhost_work_flush_on(dev->worker);
+ struct vhost_worker *worker;
+ unsigned long i;
+
+ xa_for_each(&dev->worker_xa, i, worker)
+ vhost_work_flush_on(worker);
}
EXPORT_SYMBOL_GPL(vhost_dev_flush);
@@ -489,7 +493,6 @@ void vhost_de...
2018 Nov 02
0
[PATCH 1/1] Add vhost_blk driver
...+
> + pr_debug("%s vq[%d] req->index %d ret %ld ret2 %ld\n", __func__,
> + req->q->index, req->index, ret, ret2);
> +
> + req->res = (ret == req->len) ? VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR;
> + llist_add(&req->list, &req->q->wl);
> + vhost_vq_work_queue(&req->q->vq, &req->q->w);
> +}
> +
> +static int vhost_blk_req_handle(struct vhost_blk_req *req)
> +{
> + struct vhost_blk *blk = req->q->blk;
> + struct vhost_virtqueue *vq = &req->q->vq;
> + int type = le32_to_cpu(req->hdr.type);
> +...