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 didn't need a free worker, because the kernel handles it for userspace. I > tried to make it easy for userspace because in some cases it may not be able > to do syscalls like close on the device. For example if qemu crashes or for > vhost-scsi we don't do an explicit close during VM shutdown. > > So we start off with the default worker thread that's used by all vqs like we > do > today. Userspace can then override it by creating a new worker. That also > unbinds/ > detaches the existing worker and does a put on the workers refcount. We also > do a > put on the worker when we stop using it during device > shutdown/closure/release. > When the worker's refcount goes to zero the kernel deletes it.
Please document the worker (p)id lifetime for the ioctl. Otherwise userspace doesn't know whether a previously created worker is still alive. SSTefan
signature.asc
Description: PGP signature
_______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization