public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Maximiliano Sandoval <m.sandoval@proxmox.com>,
	pve-devel@lists.proxmox.com
Subject: Re: [PATCH qemu-server] config: schema: add option to disable hugepages
Date: Mon, 13 Jul 2026 16:21:41 +0200	[thread overview]
Message-ID: <1783952439.2c3jvb9rps.astroid@yuna.none> (raw)
In-Reply-To: <20260708114855.363371-1-m.sandoval@proxmox.com>

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
> 
> 
> 
> 
> 
> 




      parent reply	other threads:[~2026-07-13 14:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1783952439.2c3jvb9rps.astroid@yuna.none \
    --to=f.gruenbichler@proxmox.com \
    --cc=m.sandoval@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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