[libvirt] [PATCH v2 2/3] lxc controller: add check for numatune

Chen Fan chen.fan.fnst at cn.fujitsu.com
Tue Oct 28 08:22:22 UTC 2014


Signed-off-by: Chen Fan <chen.fan.fnst at cn.fujitsu.com>
---
 src/lxc/lxc_controller.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 1861dd6..1ee89ab 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -689,7 +689,8 @@ static int virLXCControllerSetupResourceLimits(virLXCControllerPtr ctrl)
     int ret = -1;
 
     if (virLXCControllerGetNumadAdvice(ctrl, &nodemask) < 0 ||
-        virNumaSetupMemoryPolicy(ctrl->def->numatune, nodemask) < 0)
+        (virNumaNodesetIsAvailable (ctrl->def->numatune) &&
+         virNumaSetupMemoryPolicy(ctrl->def->numatune, nodemask) < 0))
         goto cleanup;
 
     if (virLXCControllerSetupCpuAffinity(ctrl) < 0)
-- 
1.9.3




More information about the libvir-list mailing list