Displaying 3 results from an estimated 3 matches for "xa_find".
Did you mean:
to_find
2023 Mar 28
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...r_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_get_backend(vq))
+ return -EBUSY;
+
+ worker = xa_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 vhos...
2023 Apr 10
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...tate *info)
> >> +{
> >> + unsigned long index = info->worker_id;
> >> + struct vhost_worker *worker;
> >> +
> >> + if (!dev->use_worker)
> >> + return -EINVAL;
> >> +
> >> + worker = xa_find(&dev->worker_xa, &index, UINT_MAX, XA_PRESENT);
> >
> > So we use int for worker_id which conflicts with UINT_MAX here?
>
> I switched from idr in the last versions to xa last second and added this mistake.
> Will fix.
>
>
> >
> > struct vhost_worke...
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