From: "Elias Huhsovitz" <e.huhsovitz@proxmox.com>
To: "Elias Huhsovitz" <e.huhsovitz@proxmox.com>,
<pve-devel@lists.proxmox.com>
Subject: Re: [PATCH qemu-server v6 4/5] memory: unify NUMA config parsing and resolution
Date: Thu, 03 Dec 2026 12:34:05 +0100 [thread overview]
Message-ID: <DNB2DE6569XO.1GYD7ZRBTLUBC@proxmox.com> (raw)
In-Reply-To: <20261203105300.70656-5-e.huhsovitz@proxmox.com>
I forgot to include a patch that fixes the test cases.
Here is the diff that is missing:
diff --git a/src/test/cfg2cmd/memory-numa-custom.conf.cmd b/src/test/cfg2cmd/memory-numa-custom.conf.cmd
index c20ff94a..86c9b773 100644
--- a/src/test/cfg2cmd/memory-numa-custom.conf.cmd
+++ b/src/test/cfg2cmd/memory-numa-custom.conf.cmd
@@ -18,7 +18,7 @@
-object 'memory-backend-ram,id=ram-node0,size=1024M' \
-numa 'node,nodeid=0,cpus=0-1,memdev=ram-node0' \
-object 'memory-backend-ram,id=ram-node1,size=1024M' \
- -numa 'node,nodeid=1,cpus=2,cpus=3,memdev=ram-node1' \
+ -numa 'node,nodeid=1,cpus=2-3,memdev=ram-node1' \
-global 'PIIX4_PM.disable_s3=1' \
-global 'PIIX4_PM.disable_s4=1' \
-device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
diff --git a/src/test/run_memory_tests.pl b/src/test/run_memory_tests.pl
index 90f6a1bb..d9a6598d 100755
--- a/src/test/run_memory_tests.pl
+++ b/src/test/run_memory_tests.pl
@@ -18,12 +18,12 @@ my $tests = [
['0', '0', 1],
['9', '9', 1],
['10', '10', 1],
- ['0;1', '0,1', 0],
+ ['0;1', '0-1', 0],
['0;10', '0,10', 0],
- ['0;1;10', '0,1,10', 0],
- ['1;2', '1,2', 0],
+ ['0;1;10', '0-1,10', 0],
+ ['1;2', '1-2', 0],
['0-1', '0-1', 0],
- ['0;1-2', '0,1-2', 0],
+ ['0;1-2', '0-2', 0],
];
for my $test (@$tests) {
@@ -40,7 +40,7 @@ for my $test (@$tests) {
};
# Without hugepages, multi-node bindings are valid; inspect the parsed set.
- my $nodes = PVE::QemuServer::Memory::get_effective_numa_cfg($base_conf, 1, 1, 1024, 1);
+ my $nodes = PVE::QemuServer::Memory::get_effective_numa_cfg($base_conf, 1024, 1);
is(
$nodes->[0]->{hostnodes}->short_string(),
$expected,
On Thu Dec 3, 2026 at 11:52 AM CET, Elias Huhsovitz wrote:
> Currently NUMA configuration is read and interpreted at each call site.
> Validation is scattered across differente paths, leading to inconsistent
> rules when enabling NUMA with different additional options, such as
> hugepages or memory hotplug.
>
> Introduce a single resolver, `get_effective_numa_cfg()`, that parses all
> custom numa[N] entries, auto-completes omitted memory and CPU
> assignments, generates a default topology when none is configured, and
> validates the result in one place . All three call sites now consume the
> resolved node list instead of re-parsing the raw config.
>
> As a side effect, users may now under-specify their NUMA config: omitted
> memory values are distributed across the remaining nodes, and a fully
> omitted CPU assignment is derived from sockets and cores.
>
> Signed-off-by: Elias Huhsovitz <e.huhsovitz@proxmox.com>
next prev parent reply other threads:[~2026-12-03 11:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 10:52 [PATCH common/qemu-server v6 0/5] vCPU binding for qemu guests Elias Huhsovitz
2026-12-03 10:52 ` [PATCH common v6 1/5] syscall: add sched_setaffinity Elias Huhsovitz
2026-12-03 10:52 ` [PATCH common v6 2/5] cpuset: generalize to improve usability for sysfs cpusets Elias Huhsovitz
2026-12-03 10:52 ` [PATCH qemu-server v6 3/5] helpers: return integer values for parse_number_sets Elias Huhsovitz
2026-12-03 10:52 ` [PATCH qemu-server v6 4/5] memory: unify NUMA config parsing and resolution Elias Huhsovitz
2026-12-03 11:34 ` Elias Huhsovitz [this message]
2026-12-03 10:53 ` [PATCH qemu-server v6 5/5] cpu: add affinity module Elias Huhsovitz
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=DNB2DE6569XO.1GYD7ZRBTLUBC@proxmox.com \
--to=e.huhsovitz@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