Re: [PATCH 1/1] vhost: add per-vq worker thread

2018-11-05 Thread Jason Wang
On 2018/11/5 上午11:28, Vitaly Mayatskih wrote: On Sun, Nov 4, 2018 at 9:53 PM Jason Wang wrote: 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

Re: [PATCH 1/1] vhost: add per-vq worker thread

2018-11-04 Thread Jason Wang
On 2018/11/3 上午12:07, Vitaly Mayatskikh wrote: + +static int vhost_vq_poll_start(struct vhost_virtqueue *vq) +{ + if (!vq->worker) { + vq->worker = kthread_create(vhost_vq_worker, vq, "vhost-%d/%i", + vq->dev->pid, vq->index); +