Re: [PATCH v11 3/3] vhost: Add configuration controls for vhost worker's mode
From: Jason Wang
Date: Thu Jun 12 2025 - 02:15:45 EST
On Mon, Jun 9, 2025 at 3:34 PM Cindy Lu <lulu@xxxxxxxxxx> wrote:
>
> This patch introduces functionality to control the vhost worker mode:
>
> - Add two new IOCTLs:
> * VHOST_SET_FORK_FROM_OWNER: Allows userspace to select between
> task mode (fork_owner=1) and kthread mode (fork_owner=0)
> * VHOST_GET_FORK_FROM_OWNER: Retrieves the current thread mode
> setting
>
> - Expose module parameter 'fork_from_owner_default' to allow system
> administrators to configure the default mode for vhost workers
>
> - Add KConfig option CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL to
> control the availability of these IOCTLs and parameter, allowing
> distributions to disable them if not needed
>
> - The VHOST_NEW_WORKER functionality requires fork_owner to be set
> to true, with validation added to ensure proper configuration
>
> Signed-off-by: Cindy Lu <lulu@xxxxxxxxxx>
Acked-by: Jason Wang <jasowang@xxxxxxxxxx>
Thanks