diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-04-10 14:28:05 -0400 |
---|---|---|
committer | Ian Jackson <Ian.Jackson@eu.citrix.com> | 2013-04-16 16:21:50 +0100 |
commit | eb42f98a20fd0315e9b50ffbaca822aef46214ab (patch) | |
tree | 0c46dac5125b8376ac60f47874ba66801ff52e38 /tools/libxl/xl.h | |
parent | d07824810dbc4195ce7473e899baabf4d2c8b3d9 (diff) | |
download | xen-eb42f98a20fd0315e9b50ffbaca822aef46214ab.tar.gz xen-eb42f98a20fd0315e9b50ffbaca822aef46214ab.tar.bz2 xen-eb42f98a20fd0315e9b50ffbaca822aef46214ab.zip |
xl: 'xl claims' print outstanding per domain claims
This is similar to "xl: 'xl info' print outstanding claims if enabled
(claim_mode=1 in xl.conf)" which exposes the global claim value.
This patch provides the value of the currently outstanding pages
claimed for each domains. This is per domain value which is added
to the global claim value which influences the hypervisors' MM system.
When a claim call is done, a reservation for a specific amount of pages
is set (and this patch lists said number) and also a global value is
incremented. This global value is then reduced as the domain's memory
is populated and eventually reaches zero.
The toolstack (libxc) also sets the domain's claim to zero when the population
of memory has completed as an extra step. Any call to destroy the domain
will also set the domain's claim to zero.
If the reservation cannot be meet the guest creation fails immediately
instead of taking seconds or minutes (depending on the size of the guest)
while the toolstack populates memory.
See patch: "xl: Implement XENMEM_claim_pages support via 'claim_mode'
global config" for details on how it is implemented.
The value fluctuates quite often so the value is stale once it is provided
to the user-space. However it is useful for diagnostic purposes.
It is printed irregardless of global "claim_mode" option in xl.conf(5).
That is b/c the user might have enabled, launched a guest, and then
disabled the option - and we should still report the correct outstanding
claim value. The 'man xl' shows the details of this argument.
The output is close to what 'xl list' looks like:
Name ID Mem VCPUs State Time(s) Claimed
Domain-0 0 2047 4 r----- 19.7 0
OL5 2 2048 1 --p--- 0.0 847
OL6 3 1024 4 r----- 5.9 0
Windows_XP 4 2047 1 --p--- 0.0 1989
[In which it can be seen that the OL5 guest still has 847MB of claimed
memory (out of the total 2048MB where 1191MB has been allocated to
the guest).]
Please note that the 'Mem' column has the cumulative value of outstanding
claims and the total amount of memory that has been allocated to the guest.
[v1: claims, not claim-list]
[v2: Add outstanding and current memkb in the output list]
[v3: Clairy docs and relax some checks]
[v4: Removed comments about guest config memory being the same as 'Mem']
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'tools/libxl/xl.h')
-rw-r--r-- | tools/libxl/xl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/libxl/xl.h b/tools/libxl/xl.h index 4c5e5d19a9..771b4af241 100644 --- a/tools/libxl/xl.h +++ b/tools/libxl/xl.h @@ -83,6 +83,7 @@ int main_vtpmattach(int argc, char **argv); int main_vtpmlist(int argc, char **argv); int main_vtpmdetach(int argc, char **argv); int main_uptime(int argc, char **argv); +int main_claims(int argc, char **argv); int main_tmem_list(int argc, char **argv); int main_tmem_freeze(int argc, char **argv); int main_tmem_thaw(int argc, char **argv); |