Skip to contentSkip to conversation

avoid numa placement of cpus with active cpupools

PATCH In review Juergen Gross 2 participants 4 messages Oct 26, 2010 – Oct 28, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 avoid numa placement of cpus with active cpupools

When using cpupools don't pin vcpus to numa nodes as this might conflict with the cpupool definition.
numa placement should be handled by cpupool configuration instead.

Signed-off-by [email protected]
2 files changed, 6 insertions(+), 1 deletion(-)
tools/python/xen/xend/XendCPUPool.py    |    5 +++++
tools/python/xen/xend/XendDomainInfo.py |    2 +-

# HG changeset patch
# User Juergen Gross <[email protected]> # Date 1288093915 -7200
# Node ID 55538c59d637fda3ec4a61d91270d9018b935167 # Parent cd193fa265b88bf4ff891f03c9be0e12415e6778 avoid numa placement of cpus with active cpupools

When using cpupools don't pin vcpus to numa nodes as this might conflict with the cpupool definition.
numa placement should be handled by cpupool configuration instead.

Signed-off-by [email protected]
tools/python/xen/xend/XendCPUPool.py +5 -0
diff -r cd193fa265b8 -r 55538c59d637 tools/python/xen/xend/XendCPUPool.py
@@ -883,6 +883,11 @@
     lookup_pool = classmethod(lookup_pool)
 
 
+    def number_of_pools(cls):
+        return len(xc.cpupool_getinfo())
+
+    number_of_pools = classmethod(number_of_pools)
+
     def _cpu_number_to_ref(cls, number):
         node = XendNode.instance()
         for cpu_ref in node.get_host_cpu_refs():
tools/python/xen/xend/XendDomainInfo.py +1 -1
diff -r cd193fa265b8 -r 55538c59d637 tools/python/xen/xend/XendDomainInfo.py
@@ -2748,7 +2748,7 @@
                 return map(lambda x: x[0], sorted(enumerate(nodeload), key=lambda x:x[1]))
 
             info = xc.numainfo()
-            if info['max_node_index'] > 0:
+            if info['max_node_index'] > 0 and  XendCPUPool.number_of_pools() < 2:
                 node_memory_list = info['node_memfree']
                 node_to_cpu = []
                 for i in range(0, info['max_node_index'] + 1):

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

Juergen Gross writes ("[Xen-devel] [PATCH] avoid numa placement of cpus with active cpupools"):

Quoted 3 lines

When using cpupools don't pin vcpus to numa nodes as this might conflict with the cpupool definition.
numa placement should be handled by cpupool configuration instead.

JOOI (and without looking at libxl to check) does this need a corresponding patch for libxl ?

Ian.

#2 lore raw
Quoted 7 lines · Ian Jackson

Juergen Gross writes ("[Xen-devel] [PATCH] avoid numa placement of cpus with active cpupools"):

Quoted 3 lines

When using cpupools don't pin vcpus to numa nodes as this might conflict with the cpupool definition.
numa placement should be handled by cpupool configuration instead.

JOOI (and without looking at libxl to check) does this need a corresponding patch for libxl ?

No, libxl doesn't include any numa related cpu placement up to now.

Juergen

Signature · 5 lines
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: [email protected]
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html
#3 lore raw
In reply to Juergen Gross

Juergen Gross writes ("[Xen-devel] [PATCH] avoid numa placement of cpus with active cpupools"):

Quoted 3 lines

When using cpupools don't pin vcpus to numa nodes as this might conflict with the cpupool definition.
numa placement should be handled by cpupool configuration instead.

Thanks, I have applied this patch.

Ian.