diff options
author | Dario Faggioli <raistlin@linux.it> | 2012-07-06 13:17:41 +0100 |
---|---|---|
committer | Dario Faggioli <raistlin@linux.it> | 2012-07-06 13:17:41 +0100 |
commit | 97467ae4a049d30a8bf1d00cec67ff6c41e18168 (patch) | |
tree | 72cdf203551432576f9147ae5dff937345995829 /tools/libxl/libxl_utils.c | |
parent | 618a40391f353f236c007038147a7b3771032f15 (diff) | |
download | xen-97467ae4a049d30a8bf1d00cec67ff6c41e18168.tar.gz xen-97467ae4a049d30a8bf1d00cec67ff6c41e18168.tar.bz2 xen-97467ae4a049d30a8bf1d00cec67ff6c41e18168.zip |
libxl,libxc: introduce libxl_get_numainfo()
Make some NUMA node information available to the toolstack. Achieve
this by means of xc_numainfo(), which exposes memory size and amount
of free memory of each node, as well as the relative distances of
each node to all the others.
For properly exposing distances we need the IDL to support arrays.
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxl_utils.c')
-rw-r--r-- | tools/libxl/libxl_utils.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c index f69a24c267..29f430d977 100644 --- a/tools/libxl/libxl_utils.c +++ b/tools/libxl/libxl_utils.c @@ -572,6 +572,11 @@ int libxl_get_max_cpus(libxl_ctx *ctx) return xc_get_max_cpus(ctx->xch); } +int libxl_get_max_nodes(libxl_ctx *ctx) +{ + return xc_get_max_nodes(ctx->xch); +} + int libxl__enum_from_string(const libxl_enum_string_table *t, const char *s, int *e) { @@ -594,6 +599,14 @@ void libxl_cputopology_list_free(libxl_cputopology *list, int nr) free(list); } +void libxl_numainfo_list_free(libxl_numainfo *list, int nr) +{ + int i; + for (i = 0; i < nr; i++) + libxl_numainfo_dispose(&list[i]); + free(list); +} + void libxl_vcpuinfo_list_free(libxl_vcpuinfo *list, int nr) { int i; |