2010-11-12 18:55:23 +01:00
|
|
|
# HG changeset patch
|
|
|
|
# User Juergen Gross <juergen.gross@ts.fujitsu.com>
|
|
|
|
# Date 1288264929 -3600
|
|
|
|
# Node ID dc66c13a29f9af67e0258f688bcd6330cf515383
|
|
|
|
# Parent 4ac03710fc320e8f76014ca27849da03b85dff9d
|
|
|
|
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: Juergen Gross <juergen.gross@ts.fujitsu.com>
|
|
|
|
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
|
|
|
|
|
2011-02-04 22:19:54 +01:00
|
|
|
Index: xen-4.0.2-testing/tools/python/xen/xend/XendCPUPool.py
|
2010-11-12 18:55:23 +01:00
|
|
|
===================================================================
|
2011-02-04 22:19:54 +01:00
|
|
|
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendCPUPool.py
|
|
|
|
+++ xen-4.0.2-testing/tools/python/xen/xend/XendCPUPool.py
|
2010-11-12 18:55:23 +01:00
|
|
|
@@ -881,6 +881,11 @@ class XendCPUPool(XendBase):
|
|
|
|
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():
|
2011-02-04 22:19:54 +01:00
|
|
|
Index: xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
2010-11-12 18:55:23 +01:00
|
|
|
===================================================================
|
2011-02-04 22:19:54 +01:00
|
|
|
--- xen-4.0.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
|
|
|
+++ xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
2010-11-12 18:55:23 +01:00
|
|
|
@@ -2790,7 +2790,7 @@ class XendDomainInfo:
|
|
|
|
return map(lambda x: x[0], sorted(enumerate(nodeload), key=lambda x:x[1]))
|
|
|
|
|
|
|
|
info = xc.physinfo()
|
|
|
|
- if info['nr_nodes'] > 1:
|
|
|
|
+ if info['nr_nodes'] > 1 and XendCPUPool.number_of_pools() < 2:
|
|
|
|
node_memory_list = info['node_to_memory']
|
|
|
|
needmem = self.image.getRequiredAvailableMemory(self.info['memory_dynamic_max']) / 1024
|
|
|
|
candidate_node_list = []
|