Re: [PATCH 1/6] vhost: allow device that does not depend on vhost worker

2020-06-02 Thread Jason Wang
On 2020/6/2 下午1:01, Michael S. Tsirkin wrote: On Fri, May 29, 2020 at 04:02:58PM +0800, Jason Wang wrote: diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index d450e16c5c25..70105e045768 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -166,11 +166,16 @@ static int

Re: [PATCH 1/6] vhost: allow device that does not depend on vhost worker

2020-06-01 Thread Michael S. Tsirkin
On Fri, May 29, 2020 at 04:02:58PM +0800, Jason Wang wrote: > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c > index d450e16c5c25..70105e045768 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -166,11 +166,16 @@ static int vhost_poll_wakeup(wait_queue_entry_t *wai

[PATCH 1/6] vhost: allow device that does not depend on vhost worker

2020-05-29 Thread Jason Wang
vDPA device currently relays the eventfd via vhost worker. This is inefficient due the latency of wakeup and scheduling, so this patch tries to introduce a use_worker attribute for the vhost device. When use_worker is not set with vhost_dev_init(), vhost won't try to allocate a worker thread and th