aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xenctrl.h
diff options
context:
space:
mode:
authorAndres Lagar-Cavilla <andres@lagarcavilla.org>2012-01-26 12:46:26 +0000
committerAndres Lagar-Cavilla <andres@lagarcavilla.org>2012-01-26 12:46:26 +0000
commitb3690b8c5809d093b20b04e5f016471509dd9191 (patch)
tree73343db99d9acd4dadf21ef965298d4d2d26d3a1 /tools/libxc/xenctrl.h
parent447e175bade9a36a638b8aa0a950aa0fb855623a (diff)
downloadxen-b3690b8c5809d093b20b04e5f016471509dd9191.tar.gz
xen-b3690b8c5809d093b20b04e5f016471509dd9191.tar.bz2
xen-b3690b8c5809d093b20b04e5f016471509dd9191.zip
Tools: Expose to libxc the total number of shared frames and space saved
Signed-off-by: Adin Scannell <adin@scannell.ca> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Committed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'tools/libxc/xenctrl.h')
-rw-r--r--tools/libxc/xenctrl.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h
index 2b445085b6..78133315ae 100644
--- a/tools/libxc/xenctrl.h
+++ b/tools/libxc/xenctrl.h
@@ -1228,6 +1228,23 @@ int xc_mmuext_op(xc_interface *xch, struct mmuext_op *op, unsigned int nr_ops,
/* System wide memory properties */
long xc_maximum_ram_page(xc_interface *xch);
+/**
+ * This function returns the total number of pages freed by using sharing
+ * on the system. For example, if two domains contain a single entry in
+ * their p2m map that points to the same shared page (and no other pages
+ * in the system are shared), then this function should return 1.
+ */
+long xc_sharing_freed_pages(xc_interface *xch);
+
+/**
+ * This function returns the total number of frames occupied by shared
+ * pages on the system. This is independent of the number of domains
+ * pointing at these frames. For example, in the above scenario this
+ * should return 1. The following should hold:
+ * memory usage without sharing = freed_pages + used_frames
+ */
+long xc_sharing_used_frames(xc_interface *xch);
+
/* Get current total pages allocated to a domain. */
long xc_get_tot_pages(xc_interface *xch, uint32_t domid);