]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Only check for NUMA availability if required
authorJiri Denemark <jdenemar@redhat.com>
Tue, 21 Jun 2011 16:37:10 +0000 (18:37 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 23 Jun 2011 07:39:54 +0000 (09:39 +0200)
We only care about NUMA availability if NUMA configuration is requested
in domain XML.

src/qemu/qemu_process.c

index b4411376a2dd8c61a0ea285726677968a19df610..5b452e86e65aa6b90d886710e1014433c8a6b272 100644 (file)
@@ -1197,6 +1197,9 @@ qemuProcessInitNumaMemoryPolicy(virDomainObjPtr vm)
     int i = 0;
     int maxnode = 0;
 
+    if (!vm->def->numatune.memory.nodemask)
+        return 0;
+
     VIR_DEBUG("Setting NUMA memory policy");
 
     if (numa_available() < 0) {
@@ -1205,9 +1208,6 @@ qemuProcessInitNumaMemoryPolicy(virDomainObjPtr vm)
         return -1;
     }
 
-    if (!vm->def->numatune.memory.nodemask)
-        return 0;
-
     if (VIR_ALLOC(mask) < 0) {
         virReportOOMError();
         return -1;