From 97467ae4a049d30a8bf1d00cec67ff6c41e18168 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Fri, 6 Jul 2012 13:17:41 +0100 Subject: 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 Acked-by: Ian Campbell Committed-by: Ian Campbell --- tools/libxl/libxl_types.idl | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tools/libxl/libxl_types.idl') diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index 00947e1875..2735ebd82a 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -433,6 +433,15 @@ libxl_physinfo = Struct("physinfo", [ ("cap_hvm_directio", bool), ], dir=DIR_OUT) +# NUMA node characteristics: size and free are how much memory it has, and how +# much of it is free, respectively. dists is an array of distances from this +# node to each other node. +libxl_numainfo = Struct("numainfo", [ + ("size", uint64), + ("free", uint64), + ("dists", Array(uint32, "num_dists")), + ], dir=DIR_OUT) + libxl_cputopology = Struct("cputopology", [ ("core", uint32), ("socket", uint32), -- cgit v1.2.3