|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] xend: Count CPUs rather than relying on a
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1184058796 -3600
# Node ID 3f2d2adc87f708e269247e5e89eef3c2c595d83b
# Parent b476c756ad4fdc41b0246fb4c943997e740e256e
xend: Count CPUs rather than relying on a static
nodes/sockets/cores/threads relationship.
Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
tools/python/xen/xend/XendNode.py | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff -r b476c756ad4f -r 3f2d2adc87f7 tools/python/xen/xend/XendNode.py
--- a/tools/python/xen/xend/XendNode.py Tue Jul 10 10:11:14 2007 +0100
+++ b/tools/python/xen/xend/XendNode.py Tue Jul 10 10:13:16 2007 +0100
@@ -580,14 +580,17 @@ class XendNode:
str='none\n'
return str[:-1];
+ def count_cpus(self, pinfo):
+ count=0
+ node_to_cpu=pinfo['node_to_cpu']
+ for i in range(0, pinfo['nr_nodes']):
+ count+=len(node_to_cpu[i])
+ return count;
def physinfo(self):
info = self.xc.physinfo()
- info['nr_cpus'] = (info['nr_nodes'] *
- info['sockets_per_node'] *
- info['cores_per_socket'] *
- info['threads_per_core'])
+ info['nr_cpus'] = self.count_cpus(info)
info['cpu_mhz'] = info['cpu_khz'] / 1000
# physinfo is in KiB, need it in MiB
_______________________________________________
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: Count CPUs rather than relying on a static,
Xen patchbot-unstable <=
|
|
|
|
|