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] Rename fields in physinfo_t structure and add sockets/no

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Rename fields in physinfo_t structure and add sockets/nodes
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 04 Jul 2005 12:04:09 -0400
Delivery-date: Mon, 04 Jul 2005 16:04:35 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 4b052d8a9a2fea73920dbb24b15b945bc5eacf87
# Parent  8bd2e89332778ae6456ecfd53c105f839c0094cb

Rename fields in physinfo_t structure and add sockets/nodes
fields.

diff -r 8bd2e8933277 -r 4b052d8a9a2f tools/xentrace/xentrace.c
--- a/tools/xentrace/xentrace.c Mon Jul  4 15:41:21 2005
+++ b/tools/xentrace/xentrace.c Mon Jul  4 16:02:46 2005
@@ -273,7 +273,10 @@
 
     xc_interface_close(xc_handle);
 
-    return op.u.physinfo.ht_per_core * op.u.physinfo.cores;
+    return (op.u.physinfo.threads_per_core *
+            op.u.physinfo.cores_per_socket *
+            op.u.physinfo.sockets_per_node *
+            op.u.physinfo.nr_nodes);
 }
 
 
diff -r 8bd2e8933277 -r 4b052d8a9a2f xen/arch/x86/dom0_ops.c
--- a/xen/arch/x86/dom0_ops.c   Mon Jul  4 15:41:21 2005
+++ b/xen/arch/x86/dom0_ops.c   Mon Jul  4 16:02:46 2005
@@ -179,11 +179,14 @@
     {
         dom0_physinfo_t *pi = &op->u.physinfo;
 
-        pi->ht_per_core = smp_num_siblings;
-        pi->cores       = boot_cpu_data.x86_num_cores;
-        pi->total_pages = max_page;
-        pi->free_pages  = avail_domheap_pages();
-        pi->cpu_khz     = cpu_khz;
+        pi->threads_per_core = smp_num_siblings;
+        pi->cores_per_socket = boot_cpu_data.x86_num_cores;
+        pi->sockets_per_node = 
+            num_online_cpus() / (pi->threads_per_core * pi->cores_per_socket);
+        pi->nr_nodes         = 1;
+        pi->total_pages      = max_page;
+        pi->free_pages       = avail_domheap_pages();
+        pi->cpu_khz          = cpu_khz;
 
         copy_to_user(u_dom0_op, op, sizeof(*op));
         ret = 0;
diff -r 8bd2e8933277 -r 4b052d8a9a2f xen/include/public/dom0_ops.h
--- a/xen/include/public/dom0_ops.h     Mon Jul  4 15:41:21 2005
+++ b/xen/include/public/dom0_ops.h     Mon Jul  4 16:02:46 2005
@@ -19,7 +19,7 @@
  * This makes sure that old versions of dom0 tools will stop working in a
  * well-defined way (rather than crashing the machine, for instance).
  */
-#define DOM0_INTERFACE_VERSION   0xAAAA1009
+#define DOM0_INTERFACE_VERSION   0xAAAA100A
 
 /************************************************************************/
 
@@ -206,8 +206,10 @@
  */
 #define DOM0_PHYSINFO         22
 typedef struct {
-    u32      ht_per_core;
-    u32      cores;
+    u32      threads_per_core;
+    u32      cores_per_socket;
+    u32      sockets_per_node;
+    u32      nr_nodes;
     u32      cpu_khz;
     memory_t total_pages;
     memory_t free_pages;
diff -r 8bd2e8933277 -r 4b052d8a9a2f tools/python/xen/xend/XendNode.py
--- a/tools/python/xen/xend/XendNode.py Mon Jul  4 15:41:21 2005
+++ b/tools/python/xen/xend/XendNode.py Mon Jul  4 16:02:46 2005
@@ -43,8 +43,8 @@
 
     def physinfo(self):
         pinfo = self.xc.physinfo()
-        info = [['cores', pinfo['cores']],
-                ['hyperthreads_per_core', pinfo['ht_per_core']],
+        info = [['cores_per_socket', pinfo['cores_per_socket']],
+                ['threads_per_core', pinfo['threads_per_core']],
                 ['cpu_mhz', pinfo['cpu_khz']/1000],
                 ['memory', pinfo['total_pages']/256],
                 ['free_memory', pinfo['free_pages']/256]]
diff -r 8bd2e8933277 -r 4b052d8a9a2f tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Mon Jul  4 15:41:21 2005
+++ b/tools/python/xen/lowlevel/xc/xc.c Mon Jul  4 16:02:46 2005
@@ -47,7 +47,8 @@
 
     static char *kwd_list[] = { "dom", "corefile", NULL };
 
-    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "is", kwd_list, &dom, 
&corefile) )
+    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "is", kwd_list,
+                                      &dom, &corefile) )
         goto exit;
 
     if ( (corefile == NULL) || (corefile[0] == '\0') )
@@ -82,7 +83,8 @@
 
     static char *kwd_list[] = { "dom", "ssidref", NULL };
 
-    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "|ii", kwd_list, &dom, 
&ssidref))
+    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "|ii", kwd_list,
+                                      &dom, &ssidref))
         return NULL;
 
     if ( (ret = xc_domain_create(xc->xc_handle, ssidref, &dom)) < 0 )
@@ -687,11 +689,13 @@
         return PyErr_SetFromErrno(xc_error);
 
     return Py_BuildValue("{s:i,s:i,s:l,s:l,s:l}",
-                         "ht_per_core", info.ht_per_core,
-                         "cores",       info.cores,
-                         "total_pages", info.total_pages,
-                         "free_pages",  info.free_pages,
-                         "cpu_khz",     info.cpu_khz);
+                         "threads_per_core", info.threads_per_core,
+                         "cores_per_socket", info.cores_per_socket,
+                         "sockets_per_node", info.sockets_per_node,
+                         "nr_nodes",         info.nr_nodes,
+                         "total_pages",      info.total_pages,
+                         "free_pages",       info.free_pages,
+                         "cpu_khz",          info.cpu_khz);
 }
 
 static PyObject *pyxc_sedf_domain_set(PyObject *self,
@@ -702,12 +706,15 @@
     u32 domid;
     u64 period, slice, latency;
     u16 extratime, weight;
-    static char *kwd_list[] = { "dom", "period", "slice", "latency", 
"extratime", "weight",NULL };
-    
-    if( !PyArg_ParseTupleAndKeywords(args, kwds, "iLLLhh", kwd_list, &domid,
-                                     &period, &slice, &latency, &extratime, 
&weight) )
-        return NULL;
-   if ( xc_sedf_domain_set(xc->xc_handle, domid, period, slice, latency, 
extratime,weight) != 0 )
+    static char *kwd_list[] = { "dom", "period", "slice",
+                                "latency", "extratime", "weight",NULL };
+    
+    if( !PyArg_ParseTupleAndKeywords(args, kwds, "iLLLhh", kwd_list, 
+                                     &domid, &period, &slice,
+                                     &latency, &extratime, &weight) )
+        return NULL;
+   if ( xc_sedf_domain_set(xc->xc_handle, domid, period,
+                           slice, latency, extratime,weight) != 0 )
         return PyErr_SetFromErrno(xc_error);
 
     Py_INCREF(zero);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Rename fields in physinfo_t structure and add sockets/nodes, Xen patchbot -unstable <=