search for: vhost_worker_state

Displaying 4 results from an estimated 4 matches for "vhost_worker_state".

2023 Mar 28
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...find(&dev->worker_xa, &index, UINT_MAX, XA_PRESENT); + if (!worker || worker->id != info->worker_id) + return -ENODEV; + + __vhost_vq_attach_worker(vq, worker); + return 0; +} + +/* Caller must have device mutex */ +static int vhost_new_worker(struct vhost_dev *dev, + struct vhost_worker_state *info) +{ + struct vhost_worker *worker; + + if (!dev->use_worker) + return -EINVAL; + + worker = vhost_worker_create(dev); + if (!worker) + return -ENOMEM; + + info->worker_id = worker->id; + return 0; +} + +/* Caller must have device mutex */ +static int vhost_free_worker(struct vhost_...
2023 Apr 10
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...document it and change the devices that are affected by this change. > > I'll fix this issue. > > > >> + > >> +/* Caller must have device mutex */ > >> +static int vhost_free_worker(struct vhost_dev *dev, > >> + struct vhost_worker_state *info) > >> +{ > >> + unsigned long index = info->worker_id; > >> + struct vhost_worker *worker; > >> + > >> + if (!dev->use_worker) > >> + return -EINVAL; > >> + > >> + worker = xa_f...
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
2023 Apr 12
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...the queue to workers mapping instead? > >> > >> > >> I didn't think we need the dynamic case. It was from a review comment. > > > > Right, so we actually don't need three new ioctls but only a single is > > sufficient? > > > > struct vhost_worker_state { > > __u16 workers; > > __u16 queue_to_work_map[]; > > }; > > > > And limiting this to be called before datapath can run is sufficient? > > (sorry I missed some of the previous comments). > > It's been like 3 years since this was last discu...