[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACLfguV_2Mhy-kxha5nK-GRRge1UZKYJ+21DWOhUFQ5cigeVSw@mail.gmail.com>
Date: Thu, 5 Jun 2025 15:35:34 +0800
From: Cindy Lu <lulu@...hat.com>
To: Simon Horman <horms@...nel.org>
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 Tue, Jun 3, 2025 at 3:34 PM Simon Horman <horms@...nel.org> wrote:
>
> 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.
>
sure, will fix this
Thanks
cindy
> > +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