]> xenbits.xensource.com Git - libvirt.git/commitdiff
lxc: don't setup cpuset.mems if memory mode in numatune is not 'strict'
authorWang Rui <moon.wangrui@huawei.com>
Mon, 10 Nov 2014 13:53:18 +0000 (21:53 +0800)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 11 Nov 2014 11:14:09 +0000 (12:14 +0100)
If the memory mode in numatune is not 'strict', we should not setup
cpuset.mems. Before commit 1a7be8c600905aa07ac2d78293336ba8523ad48e
we have checked the memory mode in virDomainNumatuneGetNodeset. This
patch adds the check as before.

Signed-off-by: Wang Rui <moon.wangrui@huawei.com>
src/lxc/lxc_cgroup.c

index f9af31cc84b48bc353ee4a138df5ae4023c3c9ea..eb671913045a7e4a076e7adc1e90b1798405de92 100644 (file)
@@ -79,6 +79,10 @@ static int virLXCCgroupSetupCpusetTune(virDomainDefPtr def,
             goto cleanup;
     }
 
+    if (virDomainNumatuneGetMode(def->numatune, -1) !=
+        VIR_DOMAIN_NUMATUNE_MEM_STRICT)
+        goto cleanup;
+
     if (virDomainNumatuneMaybeFormatNodeset(def->numatune, nodemask,
                                             &mask, -1) < 0)
         goto cleanup;