From: Marc Zyngier <maz@kernel.org>
To: Bernhard Kauer <bk@alpico.io>
Cc: Paolo Bonzini <pbonzini@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: make uevents configurable
Date: Tue, 26 Nov 2024 11:23:10 +0000 [thread overview]
Message-ID: <86frneutlt.wl-maz@kernel.org> (raw)
In-Reply-To: <Z0Wg0jQLRuAQrl0j@mias.mediconcil.de>
On Tue, 26 Nov 2024 10:20:02 +0000,
Bernhard Kauer <bk@alpico.io> wrote:
>
> On Mon, Nov 25, 2024 at 05:31:32PM +0000, Marc Zyngier wrote:
> > On Fri, 22 Nov 2024 09:58:02 +0000, Bernhard Kauer <bk@alpico.io> wrote:
> > > Handling of uevents in userlevel is a bottleneck for tiny VMs.
> > >
> > > Running 10_000 VMs keeps one and a half cores busy for 5.4 seconds to let
> > > systemd-udevd handle all messages. That is roughly 27x longer than
> > > the 0.2 seconds needed for running the VMs without them.
> > >
> > > We choose a read-only module parameter here due to its simplicity and
> > > ease of maintenance.
> > Thanks for this. It was on my list of things to investigate, as this
> > is a bottleneck when running a lot of concurrent syzkaller tests which
> > create and destroy VMs repeatedly.
>
> That is interesting. How many tests do you have?
It's not the number of tests. It is the number of VMs. Each test can
create several hundred of them per second. Per CPU.
> > I'm not overly keen on the command-line flag though, as this is the
> > sort of things you'd like to be able to control more finely. Or at
> > least without having to trigger a reboot.
>
> I compile KVM as module, so I can reload it with different parameters
> easily.
arm64 doesn't (and cannot) build KVM as a module. Also, the prospect
of killing all pre-existing VMs just to flip this thing is a
bit... extreme?
> > How about something such as a sysctl? with the kvm namespace?
>
> I have not seen a sysctl in KVM yet. I would probably not introduce
> another config method here.
Well, that's the standard way for changing kernel parameters at
runtime. Very last century, I know.
>
> But I can make the module parameter read-write so that it is modifiable
> during runtime via /sys/module/kvm/parameters/ even when KVM is compiled
> into the kernel.
I guess that'd be the next best thing.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2024-11-26 11:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-22 9:58 [PATCH] KVM: make uevents configurable Bernhard Kauer
2024-11-25 17:31 ` Marc Zyngier
2024-11-26 10:20 ` Bernhard Kauer
2024-11-26 11:23 ` Marc Zyngier [this message]
2024-11-27 8:38 ` Bernhard Kauer
2024-11-27 9:04 ` Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86frneutlt.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=bk@alpico.io \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.