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@xxxxxxxxx> 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? > 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. > 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. 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. Bernhard