From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38EBE1CDA19 for ; Tue, 26 Nov 2024 11:23:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732620194; cv=none; b=Utb2JnkqppQu0PmDeYqzVI0xFRkw1EsyDYUYuv0N/Ep4ha2Bg1nJL7W/qruV47U0BTx7Ut2wPieM8R/LVAWMns3WjQ9ECOuBvpWskVpPaWzyVOCFXfOufafVHn7r3oypsHqW4pG9kScZM6RVVcHEyHll3x0V9Pkng14Q3L2igcA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732620194; c=relaxed/simple; bh=OVg8zufE1hYeIFxNAr55GKePRLISQW1KOeui3m6RpUM=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=Zhon52PehbFONVrKTbJ5A3XOuVwEQ61DRhBFojgNRWNmSrkULqN4OEI3z0vTX5NoGoGqJcOYyPwTejIo+akqL9SlEmKQy4Ix5RIiUdWWFucROne5N8SkGywOBKmMwVJCBpksJg4L7u+9nIh+JY82KuiROXhtBr6OdKsef+EVqwE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HQxlDG9W; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HQxlDG9W" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B07C8C4CECF; Tue, 26 Nov 2024 11:23:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732620193; bh=OVg8zufE1hYeIFxNAr55GKePRLISQW1KOeui3m6RpUM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HQxlDG9W8UZXf9cYdElnm7HCTbly7HVo//aZk7OQnNfjtU9wHZRVEZ8d/CYGgyM5D FKWqpq8A3AvwcSt9CLBa61QWChdCw5bf2HJpwlYhskgQb+DfFWjl96s71v3agWkHk9 tA+ZyLFncz6Fx05KtLyIAZEy2ge1Kf98VbCF9zmOtMG09JnxMQ9zfyIDOLLFqZ5Izi Z/cmv7ChfwlG0TuGQUlqcgw8wJQP/yJKcKUP5cc5KNqB/Hi/0SBG1diQqaclvABmyD UTyEFvQtwR/qX1o/XqSh+/yQh9+crnPU5zi0St9k7qsK9RQSS9iY4yAdG4/PXn7zMh E/1/1PzsOMmUg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tFtex-00Fy2t-Hj; Tue, 26 Nov 2024 11:23:11 +0000 Date: Tue, 26 Nov 2024 11:23:10 +0000 Message-ID: <86frneutlt.wl-maz@kernel.org> From: Marc Zyngier To: Bernhard Kauer Cc: Paolo Bonzini , kvm@vger.kernel.org Subject: Re: [PATCH] KVM: make uevents configurable In-Reply-To: References: <20241122095806.4034415-1-bk@alpico.io> <86h67vusnf.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: bk@alpico.io, pbonzini@redhat.com, kvm@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 26 Nov 2024 10:20:02 +0000, Bernhard Kauer 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 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.