Re: [PATCH v2 1/7] vhost: Add a new modparam to allow userspace select vhost_task

From: Jason Wang
Date: Wed Oct 09 2024 - 03:29:52 EST


On Mon, Oct 7, 2024 at 9:31 PM Stefano Garzarella <sgarzare@xxxxxxxxxx> wrote:
>
> On Fri, Oct 04, 2024 at 09:58:15AM GMT, Cindy Lu wrote:
> >The vhost is now using vhost_task and working as a child of the owner thread.
> >While this makes sense from containerization POV, some old userspace is
> >confused, as previously vhost not
>
> not what?
>
> > and so was allowed to steal cpu resources
> >from outside the container. So we add the kthread API support back
>
> Sorry, but it's not clear the reason.
>
> I understand that we want to provide a way to bring back the previous
> behavior when we had kthreads, but why do we want that?
> Do you have examples where the new mechanism is causing problems?
>

The main difference is whose (kthreadd or the owner) attributes
(namespace, affinities) would vhost thread inherit.

The owner's attributes tend to be different from kthreadd, so
management might be surprised for example, vhost might be created in
different namespaces or having different scheduling affinities.

Thanks