diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-03-18 16:23:39 -0400 |
---|---|---|
committer | Ian Jackson <Ian.Jackson@eu.citrix.com> | 2013-04-16 16:21:50 +0100 |
commit | ad0fcc9fe5cac8cc79b3ec9508aa655220f1a314 (patch) | |
tree | 5da179a29c7af0f4be67268b6364d83711cd73e1 /tools/libxl/libxl.h | |
parent | fc67e9dc0c1fe0cebbc2d77fae5aa721e7089615 (diff) | |
download | xen-ad0fcc9fe5cac8cc79b3ec9508aa655220f1a314.tar.gz xen-ad0fcc9fe5cac8cc79b3ec9508aa655220f1a314.tar.bz2 xen-ad0fcc9fe5cac8cc79b3ec9508aa655220f1a314.zip |
xl: Implement XENMEM_claim_pages support via 'claim_mode' global config
The XENMEM_claim_pages hypercall operates per domain and it should be
used system wide. As such this patch introduces a global configuration
option 'claim_mode' that by default is disabled.
If this option is enabled then when a guest is created there will be an
guarantee that there is memory available for the guest. This is an
particularly acute problem on hosts with memory over-provisioned guests
that use tmem and have self-balloon enabled (which is the default option
for them). The self-balloon mechanism can deflate/inflate the balloon
quickly and the amount of free memory (which 'xl info' can show) is stale
the moment it is printed. When claim is enabled a reservation for the
amount of memory ('memory' in guest config) is set, which is then reduced
as the domain's memory is populated and eventually reaches zero.
If the reservation cannot be meet the guest creation fails immediately
instead of taking seconds/minutes (depending on the size of the guest)
while the guest is populated.
Note that to enable tmem type guests, one needs to provide 'tmem' on the
Xen hypervisor argument and as well on the Linux kernel command line.
There are two boolean options:
(0) No claim is made. Memory population during guest creation will be
attempted as normal and may fail due to memory exhaustion.
(1) Normal memory and freeable pool of ephemeral pages (tmem) is used when
calculating whether there is enough memory free to launch a guest.
This guarantees immediate feedback whether the guest can be launched due
to memory exhaustion (which can take a long time to find out if launching
massively huge guests) and in parallel.
[v1: Removed own claim_mode type, using just bool, improved docs, all per
Ian's suggestion]
[v2: Updated the comments]
[v3: Rebase on top 733b9c524dbc2bec318bfc3588ed1652455d30ec (xl: add vif.default.script)]
[v4: Fixed up comments]
[v5: s/global_claim_mode/claim_mode/]
[v6: Ian Jackson's feedback: use libxl_defbool, better comments, etc]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl.h')
-rw-r--r-- | tools/libxl/libxl.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index d18d22c0c1..e4a4ab2c7f 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -595,7 +595,6 @@ int libxl_wait_for_free_memory(libxl_ctx *ctx, uint32_t domid, uint32_t memory_k /* wait for the memory target of a domain to be reached */ int libxl_wait_for_memory_target(libxl_ctx *ctx, uint32_t domid, int wait_secs); - int libxl_vncviewer_exec(libxl_ctx *ctx, uint32_t domid, int autopass); int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, int cons_num, libxl_console_type type); /* libxl_primary_console_exec finds the domid and console number |