From: Andre Przywara <andre.przywara@amd.com>
To: "Kamble, Nitin A" <nitin.a.kamble@intel.com>
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Keir Fraser <keir.fraser@eu.citrix.com>,
Christoph Egger <Christoph.Egger@amd.com>
Subject: [PATCH] xend: make NUMA in xm info optional
Date: Thu, 15 Apr 2010 13:33:59 +0200 [thread overview]
Message-ID: <4BC6F9A7.4070204@amd.com> (raw)
In-Reply-To: <8EA2C2C4116BF44AB370468FBF85A7770125BFCEA5@orsmsx504.amr.corp.intel.com>
[-- Attachment #1: Type: text/plain, Size: 633 bytes --]
Kamble, Nitin A wrote:
> Andre,
> We will look into the xend instability issue.
I will also do this next, I reverted to using xl for now ;-)
> I also find that lots of scrolling happens with xm info output.
> I think putting the detailed information in the -v option is a
> good idea. May be you can extend it in this matter.
OK, see the attached patch. I used -n (or --numa) for clarity.
Tested against an older changeset (with still working xend).
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Regards,
Andre.
--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448-3567-12
[-- Attachment #2: xm_info_numa.patch --]
[-- Type: text/x-patch, Size: 4312 bytes --]
diff -urp xen.orig/tools/python/xen/xend/XendNode.py xen-unstable.hg/tools/python/xen/xend/XendNode.py
--- xen.orig/tools/python/xen/xend/XendNode.py 2010-04-15 13:25:40.000000000 +0200
+++ xen-unstable.hg/tools/python/xen/xend/XendNode.py 2010-04-15 12:37:37.000000000 +0200
@@ -833,8 +833,8 @@ class XendNode:
# Getting host information.
#
- def info(self):
- return (self.nodeinfo() + self.physinfo() + self.xeninfo() +
+ def info(self, show_numa = 1):
+ return (self.nodeinfo() + self.physinfo(show_numa) + self.xeninfo() +
self.xendinfo())
def nodeinfo(self):
@@ -910,7 +910,7 @@ class XendNode:
str='none\n'
return str[:-1];
- def physinfo(self):
+ def physinfo(self, show_numa):
info = self.xc.physinfo()
tinfo = self.xc.topologyinfo()
ninfo = self.xc.numainfo()
@@ -921,12 +921,6 @@ class XendNode:
info['total_memory'] = info['total_memory'] / 1024
info['free_memory'] = info['free_memory'] / 1024
- info['cpu_topology'] = \
- self.format_cpu_to_core_socket_node(tinfo)
-
- info['numa_info'] = \
- self.format_numa_info(ninfo)
-
ITEM_ORDER = ['nr_cpus',
'nr_nodes',
'cores_per_socket',
@@ -937,10 +931,17 @@ class XendNode:
'virt_caps',
'total_memory',
'free_memory',
- 'cpu_topology',
- 'numa_info',
]
+ if show_numa != 0:
+ info['cpu_topology'] = \
+ self.format_cpu_to_core_socket_node(tinfo)
+
+ info['numa_info'] = \
+ self.format_numa_info(ninfo)
+
+ ITEM_ORDER += [ 'cpu_topology', 'numa_info' ]
+
return [[k, info[k]] for k in ITEM_ORDER]
def pciinfo(self):
@@ -1050,7 +1051,7 @@ class XendNode:
def xeninfo_dict(self):
return dict(self.xeninfo())
def physinfo_dict(self):
- return dict(self.physinfo())
+ return dict(self.physinfo(1))
def info_dict(self):
return dict(self.info())
diff -urp xen.orig/tools/python/xen/xm/main.py xen-unstable.hg/tools/python/xen/xm/main.py
--- xen.orig/tools/python/xen/xm/main.py 2010-04-15 12:51:03.000000000 +0200
+++ xen-unstable.hg/tools/python/xen/xm/main.py 2010-04-15 12:43:44.000000000 +0200
@@ -145,7 +145,8 @@ SUBCOMMAND_HELP = {
'domname' : ('<DomId>', 'Convert a domain id to domain name.'),
'dump-core' : ('[-L|--live] [-C|--crash] [-R|--reset] <Domain> [Filename]',
'Dump core for a specific domain.'),
- 'info' : ('[-c|--config]', 'Get information about Xen host.'),
+ 'info' : ('[-c|--config] [-n|--numa]',
+ 'Get information about Xen host.'),
'log' : ('', 'Print Xend log'),
'rename' : ('<Domain> <NewDomainName>', 'Rename a domain.'),
'sched-sedf' : ('<Domain> [options]', 'Get/set EDF parameters.'),
@@ -320,6 +321,7 @@ SUBCOMMAND_OPTIONS = {
),
'info': (
('-c', '--config', 'List Xend configuration parameters'),
+ ('-n', '--numa', 'List host NUMA topology information'),
),
'tmem-list': (
('-l', '--long', 'List tmem stats.'),
@@ -1744,15 +1746,18 @@ def xm_info(args):
arg_check(args, "info", 0, 1)
try:
- (options, params) = getopt.gnu_getopt(args, 'c', ['config'])
+ (options, params) = getopt.gnu_getopt(args, 'cn', ['config','numa'])
except getopt.GetoptError, opterr:
err(opterr)
usage('info')
show_xend_config = 0
+ show_numa_topology = 0
for (k, v) in options:
if k in ['-c', '--config']:
show_xend_config = 1
+ if k in ['-n', '--numa']:
+ show_numa_topology = 1
if show_xend_config:
for name, obj in inspect.getmembers(xoptions):
@@ -1839,7 +1844,7 @@ def xm_info(args):
for (k, v) in sorted:
print "%-23s:" % k, v
else:
- info = server.xend.node.info()
+ info = server.xend.node.info(show_numa_topology)
for x in info[1:]:
if len(x) < 2:
print "%-23s: (none)" % x[0]
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2010-04-15 11:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-12 10:07 c/s 21118: Magny-Coure breakage Christoph Egger
2010-04-12 10:41 ` Keir Fraser
2010-04-12 11:00 ` Keir Fraser
2010-04-12 12:48 ` Dan Magenheimer
2010-04-12 13:14 ` Andre Przywara
2010-04-12 13:24 ` Keir Fraser
2010-04-12 18:28 ` Kamble, Nitin A
2010-04-14 9:46 ` Andre Przywara
2010-04-14 17:13 ` Kamble, Nitin A
2010-04-15 11:33 ` Andre Przywara [this message]
2010-04-15 12:11 ` [PATCH] xend: make NUMA in xm info optional Keir Fraser
2010-04-15 12:14 ` Andre Przywara
2010-04-15 12:19 ` Keir Fraser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BC6F9A7.4070204@amd.com \
--to=andre.przywara@amd.com \
--cc=Christoph.Egger@amd.com \
--cc=dan.magenheimer@oracle.com \
--cc=keir.fraser@eu.citrix.com \
--cc=nitin.a.kamble@intel.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.