search for: vhost_free_work

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

Did you mean: vhost_free_worker
2023 Mar 28
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...;use_worker) + return; + + for (i = 0; i < dev->nvqs; i++) + vhost_vq_detach_worker(dev->vqs[i]); + /* + * Drop the refcount taken during allocation, and handle the default + * worker and the cases where userspace might have crashed or was lazy + * and did a VHOST_NEW_WORKER but not a VHOST_FREE_WORKER. + */ + xa_for_each(&dev->worker_xa, i, worker) { + xa_erase(&dev->worker_xa, worker->id); + vhost_worker_put(dev, worker); + } + xa_destroy(&dev->worker_xa); +} + static struct vhost_worker *vhost_worker_create(struct vhost_dev *dev) { struct vhost_worker *worker;...
2023 Apr 10
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...;t found time to do this, but what I want to say is, if we want this assumption, we need to 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) &gt...
2023 Apr 12
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...>> swap and free old worker indeed? > >> > >> I didn't understand the question. > > > > I mean if I understand the code correctly, the code tries to drop > > refcnt and free the old worker during attach. > > I see. We actually don't free until VHOST_FREE_WORKER. > > When we create the worker from VHOST_NEW_WORKER we set the refcount > to 1. Then each time a virtqueue and worker are attached to each other > we increase the refcount. > > When you do vhost_vq_detach_worker then it drops the refcount from the > attach. Then if you detac...
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