fix #6907: memory: allow multi-digit host nodes with hugepages
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> Reviewed-by: Max R. Carrara <m.carrara@proxmox.com> Tested-by: Max R. Carrara <m.carrara@proxmox.com> Link: https://lore.proxmox.com/20260926084115.7-1-me@dualfroz.com [TL: add a multi-digit host node case to the memory tests] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
1 parent
0e162cc4f4
commit
c5a01a4a75
2 files changed
+2
-1
No files matched your search
@@ -649,7 +649,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);
|
||||
|
||||
@@ -17,6 +17,7 @@ $memory_module->mock('hugepages_chunk_size_supported', sub { return 1; });
|
||||
my $tests = [
|
||||
['0', '0', 1],
|
||||
['9', '9', 1],
|
||||
['10', '10', 1],
|
||||
['0;1', '0,1', 0],
|
||||
['0;10', '0,10', 0],
|
||||
['0;1;10', '0,1,10', 0],
|
||||
|
||||
Reference in new issue
Block a user