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 17FF51FF13A for ; Wed, 08 Jul 2026 13:49:31 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 39D9A21450; Wed, 08 Jul 2026 13:49:30 +0200 (CEST) From: Maximiliano Sandoval To: pve-devel@lists.proxmox.com Subject: [PATCH qemu-server] config: schema: add option to disable hugepages Date: Wed, 8 Jul 2026 13:48:54 +0200 Message-ID: <20260708114855.363371-1-m.sandoval@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783511327236 X-SPAM-LEVEL: Spam detection results: 0 DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) 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: LGA73GA6ZZYBLX4F2IMYYROVYPHYTLQQ X-Message-ID-Hash: LGA73GA6ZZYBLX4F2IMYYROVYPHYTLQQ X-MailFrom: m.sandoval@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: Most other options have admit a value for explicitly disabling a feature. Signed-off-by: Maximiliano Sandoval --- Notes: I 'grep'ed the source and the truthiness of 0 (we do not use defined($conf->{hugepages}) anywhere) should keep all existing codepaths as they were if the value is not used. Tested on a PVE VM. Ran: - 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 In both cases the VM stats and no hugepages were used. src/PVE/QemuServer.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 => "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 possible, " - . "otherwise the size will fall back to 2 MiB.", - enum => [qw(any 2 1024)], + . "otherwise the size will fall back to 2 MiB. When set to 0, hugepages will not be used.", + enum => [qw(any 0 2 1024)], }, keephugepages => { optional => 1, -- 2.47.3