* [PATCH qemu-server] config: schema: add option to disable hugepages
@ 2026-07-08 11:48 Maximiliano Sandoval
2026-07-08 11:49 ` Maximiliano Sandoval
2026-07-13 14:21 ` Fabian Grünbichler
0 siblings, 2 replies; 3+ 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] 3+ 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
2026-07-13 14:21 ` Fabian Grünbichler
1 sibling, 0 replies; 3+ 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] 3+ 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
@ 2026-07-13 14:21 ` Fabian Grünbichler
1 sibling, 0 replies; 3+ messages in thread
From: Fabian Grünbichler @ 2026-07-13 14:21 UTC (permalink / raw)
To: Maximiliano Sandoval, pve-devel
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?
>
> 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 [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-13 14:22 UTC | newest]
Thread overview: 3+ 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
2026-07-13 14:21 ` Fabian Grünbichler
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.