public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: Maximiliano Sandoval <m.sandoval@proxmox.com>,
	pve-devel@lists.proxmox.com
Subject: Re: [PATCH qemu-server v2 2/3] memory: add default NUMA allocation policy
Date: Mon, 24 Aug 2026 17:22:48 +0200	[thread overview]
Message-ID: <07c68cc8-e6f8-413c-b097-d36faedbebb8@proxmox.com> (raw)
In-Reply-To: <20260312145423.434537-3-m.sandoval@proxmox.com>

Am 12.03.26 um 3:54 PM schrieb Maximiliano Sandoval:
> This follows the host NUMA policy. This is the default policy in QEMU,
> see
> https://www.qemu.org/docs/master/interop/qemu-qmp-ref.html#object-QMP-qom.MemoryBackendProperties.

The reason we don't allow policy 'default' is that it doesn't work in
combination with host-nodes:

kvm: host-nodes must be empty for policy default, or you should
explicitly specify a policy other than default

> 
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
>  src/PVE/QemuServer/Memory.pm | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/src/PVE/QemuServer/Memory.pm b/src/PVE/QemuServer/Memory.pm
> index bcf6f9c5..f21b0b8d 100644
> --- a/src/PVE/QemuServer/Memory.pm
> +++ b/src/PVE/QemuServer/Memory.pm
> @@ -40,11 +40,12 @@ my $numa_fmt = {
>      },
>      policy => {
>          type => 'string',
> -        enum => [qw(preferred bind interleave)],
> +        enum => [qw(default preferred bind interleave)],
>          description => "NUMA allocation policy.",
>          verbose_description => <<EODESC,
>  NUMA allocation policy. Possible values are:
>  
> + - default: default host policy
>   - preferred: prefer the given host node list for allocation
>   - bind: restrict memory allocation to the given host node list
>   - interleave: interleave memory allocations across the given host node list
> @@ -53,6 +54,7 @@ The models are explained in more details at the kernel's documentation
>  https://docs.kernel.org/admin-guide/mm/numa_memory_policy.html#components-of-memory-policies.
>  EODESC
>          optional => 1,
> +        default => 'default',
>      },
>  };
>  PVE::JSONSchema::register_format('pve-qm-numanode', $numa_fmt);
> @@ -450,8 +452,7 @@ sub config {
>                  my $hostnodes = print_numa_hostnodes($hostnodelists);
>  
>                  # policy
> -                my $policy = $numa->{policy};
> -                die "you need to define a policy for hostnode $hostnodes\n" if !$policy;
> +                my $policy = $numa->{policy} // $numa_fmt->{policy}->{default};
>                  $mem_object .= ",host-nodes=$hostnodes,policy=$policy";
>              } else {
>                  die "numa hostnodes need to be defined to use hugepages" if $conf->{hugepages};





  reply	other threads:[~2026-08-24 15:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12 14:54 [PATCH qemu-server v2 0/3] memory: add verbose_description to NUMA policy Maximiliano Sandoval
2026-03-12 14:54 ` [PATCH qemu-server v2 1/3] " Maximiliano Sandoval
2026-03-12 14:54 ` [PATCH qemu-server v2 2/3] memory: add default NUMA allocation policy Maximiliano Sandoval
2026-08-24 15:22   ` Fiona Ebner [this message]
2026-03-12 14:54 ` [PATCH qemu-server v2 3/3] memory: fix unit in heuristic comment Maximiliano Sandoval
2026-08-24 15:22 ` partially-applied: [PATCH qemu-server v2 0/3] memory: add verbose_description to NUMA policy Fiona Ebner

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=07c68cc8-e6f8-413c-b097-d36faedbebb8@proxmox.com \
    --to=f.ebner@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