Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-27 Thread Stefan Hajnoczi
On Tue, Oct 26, 2021 at 11:49:37AM -0500, michael.chris...@oracle.com wrote: > On 10/26/21 12:37 AM, Jason Wang wrote: > > Do we need VHOST_VRING_FREE_WORKER? And I wonder if using dedicated ioctls > > are better: > > > > VHOST_VRING_NEW/FREE_WORKER > > VHOST_VRING_ATTACH_WORKER > > > We

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-27 Thread Stefan Hajnoczi
On Wed, Oct 27, 2021 at 10:55:04AM +0800, Jason Wang wrote: > On Tue, Oct 26, 2021 at 11:45 PM Stefan Hajnoczi wrote: > > > > On Tue, Oct 26, 2021 at 01:37:14PM +0800, Jason Wang wrote: > > > > > > 在 2021/10/22 下午1:19, Mike Christie 写道: > > > > This patch allows userspace to create workers and

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-27 Thread Jason Wang
On Wed, Oct 27, 2021 at 12:49 AM wrote: > > On 10/26/21 12:37 AM, Jason Wang wrote: > > > > 在 2021/10/22 下午1:19, Mike Christie 写道: > >> This patch allows userspace to create workers and bind them to vqs. You > >> can have N workers per dev and also share N workers with M vqs. > >> > >>

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-26 Thread Jason Wang
On Tue, Oct 26, 2021 at 11:45 PM Stefan Hajnoczi wrote: > > On Tue, Oct 26, 2021 at 01:37:14PM +0800, Jason Wang wrote: > > > > 在 2021/10/22 下午1:19, Mike Christie 写道: > > > This patch allows userspace to create workers and bind them to vqs. You > > > can have N workers per dev and also share N

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-26 Thread michael . christie
On 10/26/21 12:37 AM, Jason Wang wrote: > > 在 2021/10/22 下午1:19, Mike Christie 写道: >> This patch allows userspace to create workers and bind them to vqs. You >> can have N workers per dev and also share N workers with M vqs. >> >> Signed-off-by: Mike Christie > > > A question, who is the best

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-26 Thread Stefan Hajnoczi
On Tue, Oct 26, 2021 at 09:09:52AM -0400, Michael S. Tsirkin wrote: > On Tue, Oct 26, 2021 at 01:37:14PM +0800, Jason Wang wrote: > > > > 在 2021/10/22 下午1:19, Mike Christie 写道: > > > This patch allows userspace to create workers and bind them to vqs. You > > > can have N workers per dev and also

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-26 Thread Stefan Hajnoczi
On Tue, Oct 26, 2021 at 01:37:14PM +0800, Jason Wang wrote: > > 在 2021/10/22 下午1:19, Mike Christie 写道: > > This patch allows userspace to create workers and bind them to vqs. You > > can have N workers per dev and also share N workers with M vqs. > > > > Signed-off-by: Mike Christie > > > A

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-26 Thread Stefan Hajnoczi
On Fri, Oct 22, 2021 at 12:19:11AM -0500, Mike Christie wrote: > diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h > index c998860d7bbc..e5c0669430e5 100644 > --- a/include/uapi/linux/vhost.h > +++ b/include/uapi/linux/vhost.h > @@ -70,6 +70,17 @@ > #define

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-26 Thread Stefan Hajnoczi
On Fri, Oct 22, 2021 at 12:19:11AM -0500, Mike Christie wrote: > +/* Caller must have device mutex */ > +static int vhost_vq_setup_worker(struct vhost_virtqueue *vq, > + struct vhost_vring_worker *info) It's clearer if the function name matches the ioctl name

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-26 Thread Michael S. Tsirkin
On Tue, Oct 26, 2021 at 01:37:14PM +0800, Jason Wang wrote: > > 在 2021/10/22 下午1:19, Mike Christie 写道: > > This patch allows userspace to create workers and bind them to vqs. You > > can have N workers per dev and also share N workers with M vqs. > > > > Signed-off-by: Mike Christie > > > A

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-25 Thread Jason Wang
在 2021/10/22 下午1:19, Mike Christie 写道: This patch allows userspace to create workers and bind them to vqs. You can have N workers per dev and also share N workers with M vqs. Signed-off-by: Mike Christie A question, who is the best one to determine the binding? Is it the VMM (Qemu etc) or

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-25 Thread Michael S. Tsirkin
On Mon, Oct 25, 2021 at 11:04:42AM -0500, michael.chris...@oracle.com wrote: > On 10/23/21 3:11 PM, Michael S. Tsirkin wrote: > > On Fri, Oct 22, 2021 at 01:17:26PM -0500, michael.chris...@oracle.com wrote: > >> On 10/22/21 11:12 AM, michael.chris...@oracle.com wrote: > >>> On 10/22/21 5:47 AM,

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-25 Thread michael . christie
On 10/23/21 3:11 PM, Michael S. Tsirkin wrote: > On Fri, Oct 22, 2021 at 01:17:26PM -0500, michael.chris...@oracle.com wrote: >> On 10/22/21 11:12 AM, michael.chris...@oracle.com wrote: >>> On 10/22/21 5:47 AM, Michael S. Tsirkin wrote: > diff --git a/include/uapi/linux/vhost.h

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-23 Thread Michael S. Tsirkin
On Fri, Oct 22, 2021 at 01:17:26PM -0500, michael.chris...@oracle.com wrote: > On 10/22/21 11:12 AM, michael.chris...@oracle.com wrote: > > On 10/22/21 5:47 AM, Michael S. Tsirkin wrote: > >>> diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h > >>> index

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-22 Thread michael . christie
On 10/22/21 11:12 AM, michael.chris...@oracle.com wrote: > On 10/22/21 5:47 AM, Michael S. Tsirkin wrote: >>> diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h >>> index c998860d7bbc..e5c0669430e5 100644 >>> --- a/include/uapi/linux/vhost.h >>> +++ b/include/uapi/linux/vhost.h

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-22 Thread michael . christie
On 10/22/21 5:47 AM, Michael S. Tsirkin wrote: >> diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h >> index c998860d7bbc..e5c0669430e5 100644 >> --- a/include/uapi/linux/vhost.h >> +++ b/include/uapi/linux/vhost.h >> @@ -70,6 +70,17 @@ >> #define VHOST_VRING_BIG_ENDIAN 1 >>

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-22 Thread Michael S. Tsirkin
On Fri, Oct 22, 2021 at 12:19:11AM -0500, Mike Christie wrote: > This patch allows userspace to create workers and bind them to vqs. You > can have N workers per dev and also share N workers with M vqs. > > Signed-off-by: Mike Christie > --- > drivers/vhost/vhost.c| 99

[PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-21 Thread Mike Christie
This patch allows userspace to create workers and bind them to vqs. You can have N workers per dev and also share N workers with M vqs. Signed-off-by: Mike Christie --- drivers/vhost/vhost.c| 99 drivers/vhost/vhost.h| 2 +-