# HG changeset patch # User Juergen Gross # 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 Signed-off-by: Ian Jackson Index: xen-4.0.2-testing/tools/python/xen/xend/XendCPUPool.py =================================================================== --- xen-4.0.2-testing.orig/tools/python/xen/xend/XendCPUPool.py +++ xen-4.0.2-testing/tools/python/xen/xend/XendCPUPool.py @@ -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(): Index: xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- xen-4.0.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.0.2-testing/tools/python/xen/xend/XendDomainInfo.py @@ -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 = []