[PATCH v2 0/7] vhost: Add support of kthread API

Cindy Lu posted 7 patches 1 month, 3 weeks ago
There is a newer version of this series
drivers/vhost/vhost.c      | 249 +++++++++++++++++++++++++++++++++++--
drivers/vhost/vhost.h      |   1 +
include/uapi/linux/vhost.h |   2 +
3 files changed, 243 insertions(+), 9 deletions(-)
[PATCH v2 0/7] vhost: Add support of kthread API
Posted by Cindy Lu 1 month, 3 weeks ago
In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"),
vhost is now a child of the owner thread. but some old userspace is confused, In these patch we will let userspace to select the mode 

In this PATCH, the support of kthread is added back.
a module_param is added to select which mode we are using, and
a new UAPI is introduced to allow the userspace app to set which
mode they want to use.

Changelog v2: 
 1. Change the module_param's name to enforce_inherit_owner, and the default value is true.
 2. Change the UAPI's name to VHOST_SET_INHERIT_FROM_OWNER.
 
Tested with QEMU.

Cindy Lu (7):
  vhost: Add a new modparam to allow userspace select vhost_task
  vhost: Add kthread support in function vhost_worker_queue()
  vhost: Add kthread support in function vhost_workers_free()
  vhost: Add the vhost_worker to support kthread
  vhost: Add the cgroup related function
  vhost: Add kthread support in function vhost_worker_create
  vhost: Add new UAPI to support change to task mode

 drivers/vhost/vhost.c      | 249 +++++++++++++++++++++++++++++++++++--
 drivers/vhost/vhost.h      |   1 +
 include/uapi/linux/vhost.h |   2 +
 3 files changed, 243 insertions(+), 9 deletions(-)

-- 
2.45.0