|
|
9119d9 |
From 50407fa2b06aafa4b271ad3a1c3497dc6e21ee94 Mon Sep 17 00:00:00 2001
|
|
|
9119d9 |
Message-Id: <50407fa2b06aafa4b271ad3a1c3497dc6e21ee94@dist-git>
|
|
|
9119d9 |
From: Wang Rui <moon.wangrui@huawei.com>
|
|
|
9119d9 |
Date: Tue, 27 Jan 2015 11:40:09 +0100
|
|
|
9119d9 |
Subject: [PATCH] lxc: don't setup cpuset.mems if memory mode in numatune is
|
|
|
9119d9 |
not 'strict'
|
|
|
9119d9 |
|
|
|
9119d9 |
https://bugzilla.redhat.com/show_bug.cgi?id=1186094
|
|
|
9119d9 |
|
|
|
9119d9 |
If the memory mode in numatune is not 'strict', we should not setup
|
|
|
9119d9 |
cpuset.mems. Before commit 1a7be8c600905aa07ac2d78293336ba8523ad48e
|
|
|
9119d9 |
we have checked the memory mode in virDomainNumatuneGetNodeset. This
|
|
|
9119d9 |
patch adds the check as before.
|
|
|
9119d9 |
|
|
|
9119d9 |
Signed-off-by: Wang Rui <moon.wangrui@huawei.com>
|
|
|
9119d9 |
(cherry picked from commit 8a3844f8189af257ff3f5aa298eda55b73f2a4d3)
|
|
|
9119d9 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
9119d9 |
---
|
|
|
9119d9 |
src/lxc/lxc_cgroup.c | 4 ++++
|
|
|
9119d9 |
1 file changed, 4 insertions(+)
|
|
|
9119d9 |
|
|
|
9119d9 |
diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c
|
|
|
9119d9 |
index f9af31c..eb67191 100644
|
|
|
9119d9 |
--- a/src/lxc/lxc_cgroup.c
|
|
|
9119d9 |
+++ b/src/lxc/lxc_cgroup.c
|
|
|
9119d9 |
@@ -79,6 +79,10 @@ static int virLXCCgroupSetupCpusetTune(virDomainDefPtr def,
|
|
|
9119d9 |
goto cleanup;
|
|
|
9119d9 |
}
|
|
|
9119d9 |
|
|
|
9119d9 |
+ if (virDomainNumatuneGetMode(def->numatune, -1) !=
|
|
|
9119d9 |
+ VIR_DOMAIN_NUMATUNE_MEM_STRICT)
|
|
|
9119d9 |
+ goto cleanup;
|
|
|
9119d9 |
+
|
|
|
9119d9 |
if (virDomainNumatuneMaybeFormatNodeset(def->numatune, nodemask,
|
|
|
9119d9 |
&mask, -1) < 0)
|
|
|
9119d9 |
goto cleanup;
|
|
|
9119d9 |
--
|
|
|
9119d9 |
2.2.2
|
|
|
9119d9 |
|