All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] avoid numa placement of cpus with active cpupools
@ 2010-10-26 11:52 Juergen Gross
  2010-10-27 16:11 ` Ian Jackson
  2010-10-28 11:22 ` Ian Jackson
  0 siblings, 2 replies; 4+ messages in thread
From: Juergen Gross @ 2010-10-26 11:52 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 369 bytes --]

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@ts.fujitsu.com


2 files changed, 6 insertions(+), 1 deletion(-)
tools/python/xen/xend/XendCPUPool.py    |    5 +++++
tools/python/xen/xend/XendDomainInfo.py |    2 +-



[-- Attachment #2: xen-staging.hg.patch --]
[-- Type: text/x-patch, Size: 1676 bytes --]

# HG changeset patch
# User Juergen Gross <juergen.gross@ts.fujitsu.com>
# 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: juergen.gross@ts.fujitsu.com

diff -r cd193fa265b8 -r 55538c59d637 tools/python/xen/xend/XendCPUPool.py
--- a/tools/python/xen/xend/XendCPUPool.py	Tue Oct 26 12:22:52 2010 +0100
+++ b/tools/python/xen/xend/XendCPUPool.py	Tue Oct 26 13:51:55 2010 +0200
@@ -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():
diff -r cd193fa265b8 -r 55538c59d637 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py	Tue Oct 26 12:22:52 2010 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py	Tue Oct 26 13:51:55 2010 +0200
@@ -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):

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-28 11:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-26 11:52 [PATCH] avoid numa placement of cpus with active cpupools Juergen Gross
2010-10-27 16:11 ` Ian Jackson
2010-10-28  4:31   ` Juergen Gross
2010-10-28 11:22 ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.