From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 908231FF0E1 for ; Mon, 13 Jul 2026 16:22:20 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 9956F21376; Mon, 13 Jul 2026 16:22:19 +0200 (CEST) Date: Mon, 13 Jul 2026 16:21:41 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= Subject: Re: [PATCH qemu-server] config: schema: add option to disable hugepages To: Maximiliano Sandoval , pve-devel@lists.proxmox.com References: <20260708114855.363371-1-m.sandoval@proxmox.com> In-Reply-To: <20260708114855.363371-1-m.sandoval@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.17.0 (https://github.com/astroidmail/astroid) Message-Id: <1783952439.2c3jvb9rps.astroid@yuna.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783952489561 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.367 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust 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: 3VXFELAKEMSIWAFGEEZ5URWGAAJ2FDFV X-Message-ID-Hash: 3VXFELAKEMSIWAFGEEZ5URWGAAJ2FDFV X-MailFrom: f.gruenbichler@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 July 8, 2026 1:48 pm, Maximiliano Sandoval wrote: > Most other options have admit a value for explicitly disabling a feature. this is not true, for most options other than booleans disabling means not setting it? >=20 > Signed-off-by: Maximiliano Sandoval > --- >=20 > Notes: > I 'grep'ed the source and the truthiness of 0 (we do not use > defined($conf->{hugepages}) anywhere) should keep all existing codepa= ths as they > were if the value is not used. > =20 > Tested on a PVE VM. Ran: > =20 > - qm set 100 --hugepages 0 && qm start 100 > - head /sys/kernel/mm/hugepages/hugepages-*kB/nr_hugepages > - qm set 100 --hugepages 0 --numa 1 && qm start 100 > - head /sys/kernel/mm/hugepages/hugepages-*kB/nr_hugepages > =20 > In both cases the VM stats and no hugepages were used. >=20 > src/PVE/QemuServer.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm > index 59a37098..f8b986f5 100644 > --- a/src/PVE/QemuServer.pm > +++ b/src/PVE/QemuServer.pm > @@ -438,8 +438,8 @@ EODESC > description =3D> > "Enables hugepages memory.\n\nSets the size of hugepages in = MiB. If the value " > . "is set to 'any' then 1 GiB hugepages will be used if poss= ible, " > - . "otherwise the size will fall back to 2 MiB.", > - enum =3D> [qw(any 2 1024)], > + . "otherwise the size will fall back to 2 MiB. When set to 0= , hugepages will not be used.", > + enum =3D> [qw(any 0 2 1024)], > }, > keephugepages =3D> { > optional =3D> 1, > --=20 > 2.47.3 >=20 >=20 >=20 >=20 >=20 >=20