[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250603073423.GX1484967@horms.kernel.org>
Date: Tue, 3 Jun 2025 08:34:23 +0100
From: Simon Horman <horms@...nel.org>
To: Cindy Lu <lulu@...hat.com>
Cc: jasowang@...hat.com, mst@...hat.com, michael.christie@...cle.com,
sgarzare@...hat.com, linux-kernel@...r.kernel.org,
virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org
Subject: Re: [PATCH RESEND v10 1/3] vhost: Add a new modparam to allow
userspace select kthread
On Sat, May 31, 2025 at 05:57:26PM +0800, Cindy Lu wrote:
> The vhost now uses vhost_task and workers as a child of the owner thread.
> While this aligns with containerization principles, it confuses some
> legacy userspace applications, therefore, we are reintroducing kthread
> API support.
>
> Add a new module parameter to allow userspace to select behavior
> between using kthread and task.
>
> By default, this parameter is set to true (task mode). This means the
> default behavior remains unchanged by this patch.
>
> Signed-off-by: Cindy Lu <lulu@...hat.com>
> ---
> drivers/vhost/vhost.c | 5 +++++
> drivers/vhost/vhost.h | 10 ++++++++++
> 2 files changed, 15 insertions(+)
>
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index 3a5ebb973dba..240ba78b1e3f 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -41,6 +41,10 @@ static int max_iotlb_entries = 2048;
> module_param(max_iotlb_entries, int, 0444);
> MODULE_PARM_DESC(max_iotlb_entries,
> "Maximum number of iotlb entries. (default: 2048)");
> +bool inherit_owner_default = true;
Hi Cindy,
I don't mean to block progress of this patchset.
But it looks like inherit_owner_default can be static.
Flagged by Sparse.
> +module_param(inherit_owner_default, bool, 0444);
> +MODULE_PARM_DESC(inherit_owner_default,
> + "Set task mode as the default(default: Y)");
...
Powered by blists - more mailing lists