From: "Max R. Carrara" <m.carrara@proxmox.com>
To: "Michal Fox" <me@dualfroz.com>, <pve-devel@lists.proxmox.com>
Subject: Re: [PATCH qemu-server] fix #6907: memory: allow multi-digit host nodes with hugepages
Date: Mon, 28 Sep 2026 17:26:15 +0200 [thread overview]
Message-ID: <DLR1Z78T7G5X.9DH99VXUKQAO@proxmox.com> (raw)
In-Reply-To: <20260926084115.7-1-me@dualfroz.com>
On Sat Sep 26, 2026 at 10:41 AM CEST, Michal Fox wrote:
> When hugepages are enabled, each custom NUMA node must be bound to a
> single host node. This was checked with a regex that only accepts a
> single digit, so any host node from 10 upwards was rejected with a
> misleading "more than 1 hostnode value" error, making hugepages
> unusable on hosts with more than ten NUMA nodes.
>
> Accept any single node number instead. Ranges and lists are still
> rejected as before.
>
> Signed-off-by: Michal Fox <me@dualfroz.com>
> ---
Tested this using nested virtualization -- set up a PVE host with 16
sockets with one core each, so that I could get 16 NUMA nodes. Then, set
up a plain debian VM with the following config:
# cat /etc/pve/qemu-server/100.conf
agent: 1
boot: order=scsi0;ide2;net0
cores: 2
hugepages: 2
keephugepages: 1
cpu: host,flags=+pdpe1gb
memory: 2048
meta: creation-qemu=11.0.3,ctime=1790606472
name: debian
net0: virtio=BC:24:11:18:79:1B,bridge=vmbr0,firewall=1
numa: 1
numa0: cpus=0-1,hostnodes=10,memory=1024,policy=bind
numa1: cpus=2-3,hostnodes=11,memory=1024,policy=bind
ostype: l26
scsi0: local-lvm:vm-100-disk-0,discard=on,iothread=1,size=16G,ssd=1
scsihw: virtio-scsi-single
smbios1: uuid=7d0a0af3-812b-47ed-916d-09691c9501d1
sockets: 2
vmgenid: a4e34401-cce7-49b4-b253-1f0e792b2473
Tried to launch the VM before and after applying this patch -- after
applying it, the error of the addressed branch indeed does not show up
anymore.
I still didn't get to actually launch the VM however, since hugepage
allocation fails in my case. I did configure hugepages via the kernel
cmdline, FYI. Probably something obvious I'm missing here, but anyhow,
that's orthogonal to this patch.
I checked the surrounding code of this patch as well, and the capture
group that is removed is not used anywhere, so we're good in that
regard. The scope of that branch is quite narrow too, so I didn't expect
any surprises there.
Thanks a lot for yet another contribution, it's much appreciated!
Since the fix works as advertised, consider:
Reviewed-by: Max R. Carrara <m.carrara@proxmox.com>
Tested-by: Max R. Carrara <m.carrara@proxmox.com>
> src/PVE/QemuServer/Memory.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/PVE/QemuServer/Memory.pm b/src/PVE/QemuServer/Memory.pm
> index 27738cd9..9b7c24fa 100644
> --- a/src/PVE/QemuServer/Memory.pm
> +++ b/src/PVE/QemuServer/Memory.pm
> @@ -640,7 +640,7 @@ sub hugepages_topology {
> my $hostnodes = print_numa_hostnodes($hostnodelists);
>
> die "more than 1 hostnode value in numa node is not supported when hugepages are enabled"
> - if $hostnodes !~ m/^(\d)$/;
> + if $hostnodes !~ m/^\d+$/;
> my $hugepages_size = hugepages_size($conf, $numa_memory);
> $hugepages_topology->{$hugepages_size}->{$hostnodes} +=
> hugepages_nr($numa_memory, $hugepages_size);
prev parent reply other threads:[~2026-09-28 15:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-26 8:41 [PATCH qemu-server] fix #6907: memory: allow multi-digit host nodes with hugepages Michal Fox
2026-09-28 15:26 ` Max R. Carrara [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=DLR1Z78T7G5X.9DH99VXUKQAO@proxmox.com \
--to=m.carrara@proxmox.com \
--cc=me@dualfroz.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