public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH qemu-server] config: schema: add option to disable hugepages
@ 2026-07-08 11:48 Maximiliano Sandoval
  2026-07-08 11:49 ` Maximiliano Sandoval
  0 siblings, 1 reply; 2+ messages in thread
From: Maximiliano Sandoval @ 2026-07-08 11:48 UTC (permalink / raw)
  To: pve-devel

Most other options have admit a value for explicitly disabling a feature.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---

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





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH qemu-server] config: schema: add option to disable hugepages
  2026-07-08 11:48 [PATCH qemu-server] config: schema: add option to disable hugepages Maximiliano Sandoval
@ 2026-07-08 11:49 ` Maximiliano Sandoval
  0 siblings, 0 replies; 2+ messages in thread
From: Maximiliano Sandoval @ 2026-07-08 11:49 UTC (permalink / raw)
  To: pve-devel

Maximiliano Sandoval <m.sandoval@proxmox.com> writes:

> Most other options have admit a value for explicitly disabling a feature.

The `have` should be removed from the commit message.

-- 
Maximiliano




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-08 11:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08 11:48 [PATCH qemu-server] config: schema: add option to disable hugepages Maximiliano Sandoval
2026-07-08 11:49 ` Maximiliano Sandoval

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal