[pve-devel] [PATCH] add hugepages option v5

Alexandre DERUMIER aderumier at odiso.com
Wed Jun 8 05:45:03 CEST 2016


>>When adding more numaX entries to the VM's config than the host has this 
>>now produces an 'Use of uninitialized value' error. 
>>Better check for whether /sys/devices/system/node/node$numanode exists 
>>and throw a useful error. 
>>But should this even be fixed to host nodes? Without hugepages I was 
>>able to provide more smaller numa nodes to the guest (iow. split one big 
>>host numa node into multiple smaller virtual ones), should this not work 
>>with hugepages, too? 

Here a fix, we need to define hostnodes in numaX, if we want to use hugepages.



diff --git a/PVE/QemuServer/Memory.pm b/PVE/QemuServer/Memory.pm
index 3c23ea5..846cdc9 100644
--- a/PVE/QemuServer/Memory.pm
+++ b/PVE/QemuServer/Memory.pm
@@ -223,6 +223,8 @@ sub config {
                my $policy = $numa->{policy};
                die "you need to define a policy for hostnode $hostnodes\n" if !$policy;
                $mem_object .= ",host-nodes=$hostnodes,policy=$policy";
+           } else {
+               die "numa hostnodes need to be defined to use hugepages" if $conf->{hugepages};
            }
 
            push @$cmd, '-object', $mem_object;
-- 



More information about the pve-devel mailing list