[pve-devel] [PATCH 1/2] hugepages: check if numa node exist only if hugepages are enabled

Alexandre Derumier aderumier at odiso.com
Fri Jul 29 05:17:33 CEST 2016


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer/Memory.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer/Memory.pm b/PVE/QemuServer/Memory.pm
index 047ddad..58c7217 100644
--- a/PVE/QemuServer/Memory.pm
+++ b/PVE/QemuServer/Memory.pm
@@ -263,7 +263,7 @@ sub config {
 	    my $numa_memory = ($static_memory / $sockets);
 
 	    for (my $i = 0; $i < $sockets; $i++)  {
-		die "host NUMA node$i doesn't exist\n" if ! -d "/sys/devices/system/node/node$i/";
+		die "host NUMA node$i doesn't exist\n" if ! -d "/sys/devices/system/node/node$i/" && $conf->{hugepages};
 
 		my $cpustart = ($cores * $i);
 		my $cpuend = ($cpustart + $cores - 1) if $cores && $cores > 1;
-- 
2.1.4



More information about the pve-devel mailing list