Re: [PATCH v11 2/3] vhost: Reintroduce kthread mode support in vhost
From: Jason Wang
Date: Thu Jun 12 2025 - 02:14:32 EST
On Mon, Jun 9, 2025 at 3:34 PM Cindy Lu <lulu@xxxxxxxxxx> wrote:
>
> This patch reintroduces kthread mode support in vhost,
> It also introduces struct vhost_worker_ops to abstract
> worker create/stop/wakeup operations.
>
> * Bring back the original vhost_worker() implementation,
> and renamed to vhost_run_work_kthread_list().
>
> * Add cgroup support for the kthread
>
> * Introduce struct vhost_worker_ops:
> - Encapsulates create / stop / wake‑up callbacks.
> - vhost_worker_create() selects the proper ops according to
> inherit_owner.
>
> This partially reverts or improves upon:
> commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads")
> commit 1cdaafa1b8b4 ("vhost: replace single worker pointer with xarray")
>
> Signed-off-by: Cindy Lu <lulu@xxxxxxxxxx>
Acked-by: Jason Wang <jasowang@xxxxxxxxxx>
Thanks