WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xend, NUMA: Fix computation of needed nod

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend, NUMA: Fix computation of needed nodes
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Jan 2010 02:20:20 -0800
Delivery-date: Thu, 14 Jan 2010 02:20:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1263462248 0
# Node ID aaf34d74b62228555c7542568781319b6c477d12
# Parent  ab5845cfa62dd612d629d16cbaff9748d911981f
xend, NUMA: Fix computation of needed nodes

Enumerate the best nodes and add CPU affinity until all VCPUs can be
backed by at least one physical core. This should fix problems with
asymmetric NUMA configurations and cropped number of CPUs in Xen.

Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff -r ab5845cfa62d -r aaf34d74b622 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Thu Jan 14 09:42:40 2010 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Thu Jan 14 09:44:08 2010 +0000
@@ -2724,13 +2724,12 @@ class XendDomainInfo:
                         candidate_node_list.append(i)
                 best_node = find_relaxed_node(candidate_node_list)[0]
                 cpumask = info['node_to_cpu'][best_node]
-                cores_per_node = info['nr_cpus'] / info['nr_nodes']
-                nodes_required = (self.info['VCPUs_max'] + cores_per_node - 1) 
/ cores_per_node
-                if nodes_required > 1:
-                    log.debug("allocating %d NUMA nodes", nodes_required)
-                    best_nodes = find_relaxed_node(filter(lambda x: x != 
best_node, range(0,info['nr_nodes'])))
-                    for i in best_nodes[:nodes_required - 1]:
-                        cpumask = cpumask + info['node_to_cpu'][i]
+                best_nodes = find_relaxed_node(filter(lambda x: x != 
best_node, range(0,info['nr_nodes'])))
+                for node_idx in best_nodes:
+                    if len(cpumask) >= self.info['VCPUs_max']:
+                        break
+                    cpumask = cpumask + info['node_to_cpu'][node_idx]
+                    log.debug("allocating additional NUMA node %d", node_idx)
                 for v in range(0, self.info['VCPUs_max']):
                     xc.vcpu_setaffinity(self.domid, v, cpumask)
         return index

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend, NUMA: Fix computation of needed nodes, Xen patchbot-unstable <=