[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 03 of 11] libxc, libxl: introduce xc_nodemap_t and libxl_nodemap



On 31/05/12 13:11, Dario Faggioli wrote:
As NUMA node-related counterparts of xc_cpumap_t and libxl_cpumap.

This is in preparation of making it possible to manipulate
NUMA nodes from the toolstack(s).

Signed-off-by: Dario Faggioli<dario.faggioli@xxxxxxxxxx>

diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c
--- a/tools/libxc/xc_misc.c
+++ b/tools/libxc/xc_misc.c
@@ -35,11 +35,30 @@ int xc_get_max_cpus(xc_interface *xch)
      return max_cpus;
  }

+int xc_get_max_nodes(xc_interface *xch)
+{
+    static int max_nodes = 0;
+    xc_physinfo_t physinfo;
+
+    if ( max_nodes )
+        return max_nodes;
+
+    if ( !xc_physinfo(xch,&physinfo) )
+        max_nodes = physinfo.max_node_id + 1;
+
+    return max_nodes;
What does xc_physinfo() return? Should this return the error message rather than 0 if it fails?

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.