From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 63FC91FF13B for ; Wed, 25 Feb 2026 11:45:43 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B167F34A04; Wed, 25 Feb 2026 11:46:39 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 25 Feb 2026 11:46:02 +0100 Message-Id: From: "Daniel Kral" To: "Markus Frank" , Subject: Re: [PATCH qemu-server v2 2/11] fix #6370: virtiofs: add support for thread-pool-size option X-Mailer: aerc 0.21.0-38-g7088c3642f2c-dirty References: <20260223155951.468572-1-m.frank@proxmox.com> <20260223155951.468572-3-m.frank@proxmox.com> In-Reply-To: <20260223155951.468572-3-m.frank@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1772016346297 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.025 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: VJTCLKSDESG6VCVJB4I3JIYTPNQ3CO27 X-Message-ID-Hash: VJTCLKSDESG6VCVJB4I3JIYTPNQ3CO27 X-MailFrom: d.kral@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon Feb 23, 2026 at 4:39 PM CET, Markus Frank wrote: > Allows tuning the number of worker threads used by virtiofsd. > > Signed-off-by: Markus Frank > --- > src/PVE/QemuServer/Virtiofs.pm | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/src/PVE/QemuServer/Virtiofs.pm b/src/PVE/QemuServer/Virtiofs= .pm > index b181db5f..cd95470d 100644 > --- a/src/PVE/QemuServer/Virtiofs.pm > +++ b/src/PVE/QemuServer/Virtiofs.pm > @@ -60,6 +60,14 @@ my $virtiofs_fmt =3D { > default =3D> 0, > optional =3D> 1, > }, > + 'thread-pool-size' =3D> { > + type =3D> 'integer', > + description =3D> "Controls the maximum number of worker threads = used by virtiofsd to" > + . " handle requests. A value of '0' disables the thread pool= .", > + default =3D> 0, > + minimum =3D> 0, > + optional =3D> 1, > + }, > }; > PVE::JSONSchema::register_format('pve-qm-virtiofs', $virtiofs_fmt); > =20 > @@ -180,6 +188,8 @@ sub start_virtiofsd { > my $cmd =3D [$virtiofsd_bin, "--fd=3D$fd", "--shared-dir=3D$= path"]; > push @$cmd, '--xattr' if $virtiofs->{'expose-xattr'}; > push @$cmd, '--posix-acl' if $virtiofs->{'expose-acl'}; > + push @$cmd, '--thread-pool-size=3D' . $virtiofs->{'thread-po= ol-size'} > + if $virtiofs->{'thread-pool-size'}; nit: this should be `if defined($virtiofs->{'thread-pool-size'})`, otherwise it will not add `--thread-pool-size` at all. This still works as expected because virtiofsd itself falls back to 0 though [0]. [0] https://gitlab.com/virtio-fs/virtiofsd/-/blob/89a24d1eb57d20b497c53a11c= bf60a79b5655de4/src/main.rs#L156 > push @$cmd, '--announce-submounts'; > push @$cmd, '--allow-direct-io' if $virtiofs->{'direct-io'}; > push @$cmd, '--cache=3D' . $virtiofs->{cache} if $virtiofs->= {cache};