search for: vhost_vring_worker

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

2023 Mar 28
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...truct vhost_virtqueue *vq, + struct vhost_worker *worker) +{ + refcount_inc(&worker->refcount); + vhost_vq_detach_worker(vq); + vq->worker = worker; +} + +/* Caller must have device and virtqueue mutex */ +static int vhost_vq_attach_worker(struct vhost_virtqueue *vq, + struct vhost_vring_worker *info) +{ + unsigned long index = info->worker_id; + struct vhost_dev *dev = vq->dev; + struct vhost_worker *worker; + + if (!dev->use_worker) + return -EINVAL; + + /* + * We don't support setting a worker on an active vq to make flushing + * and removal simple. + */ + if (vhost_vq...
2023 Apr 12
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...nts). > > It's been like 3 years since this was last discussed so no problem :) > I'm really sorry for that, -ENOMEM :( > Yeah, what you describe is all I need. Originally I just had the one > ioctl: > > +#define VHOST_SET_VRING_WORKER _IOWR(VHOST_VIRTIO, 0x15, struct vhost_vring_worker) > > The VHOST_SET_VRING_WORKER created a worker on the virtqueue in the > vhost_vring_worker. > > > >>>> > >>>>>> - default: > >>>>>> + case VHOST_ATTACH_VRING_WORKER: > >>>>>> +...
2023 Apr 10
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...gt; > seems not the case of vhost_scsi_tmf_resp_work()). > > > >> +} > >> + > >> +/* Caller must have device and virtqueue mutex */ > >> +static int vhost_vq_attach_worker(struct vhost_virtqueue *vq, > >> + struct vhost_vring_worker *info) > >> +{ > >> + unsigned long index = info->worker_id; > >> + struct vhost_dev *dev = vq->dev; > >> + struct vhost_worker *worker; > >> + > >> + if (!dev->use_worker) > >> + return -E...
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