[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z2RYyagu3phDFIac@kbusch-mbp.dhcp.thefacebook.com>
Date: Thu, 19 Dec 2024 10:32:57 -0700
From: Keith Busch <kbusch@...nel.org>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
michael.christie@...cle.com, Tejun Heo <tj@...nel.org>,
Luca Boccassi <bluca@...ian.org>
Subject: Re: [PATCH] KVM: x86: switch hugepage recovery thread to vhost_task
On Fri, Nov 08, 2024 at 08:07:37AM -0500, Paolo Bonzini wrote:
> Since the worker kthread is tied to a user process, it's better if
> it behaves similarly to user tasks as much as possible, including
> being able to send SIGSTOP and SIGCONT. In fact, vhost_task is all
> that kvm_vm_create_worker_thread() wanted to be and more: not only it
> inherits the userspace process's cgroups, it has other niceties like
> being parented properly in the process tree. Use it instead of the
> homegrown alternative.
This appears to be causing a user space regression. The library
"minijail" is used by virtual machine manager "crossvm". crossvm uses
minijail to fork processes, but the library requires the process be
single threaded. Prior to this patch, the process was single threaded,
but this change creates a relationship from the kvm thread to the user
process that fails minijail's test.
For reference, here's the affected library function reporting this
behavior change:
https://github.com/google/minijail/blob/main/rust/minijail/src/lib.rs#L987
Reverting the patch makes it work again.
Fwiw, I think the single threaded check may be misguided, but just doing
my due diligence to report the user space interaction.
Powered by blists - more mailing lists