|
|
|
|
|
|
|
|
|
|
xen-api
[Xen-API] [PATCH 2 of 4] [XIU]: rename tot_mem -> tot_mem_kib and max_me
# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# Date 1259087099 0
# Node ID 25cea9ab5619b4e4d728c4c6592ea673f9ee1a14
# Parent d44ec1dbdf457ddef70a1b1d3dfbd5741c9a0f70
[XIU]: rename tot_mem -> tot_mem_kib and max_mem -> max_mem_kib
Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>
diff -r d44ec1dbdf45 -r 25cea9ab5619 ocaml/xiu/xiu.ml
--- a/ocaml/xiu/xiu.ml Tue Nov 24 18:24:59 2009 +0000
+++ b/ocaml/xiu/xiu.ml Tue Nov 24 18:24:59 2009 +0000
@@ -69,8 +69,8 @@
type xendomain = {
domid: int;
hvm: bool;
- mutable tot_mem: int; (* memory in use *)
- mutable max_mem: int; (* maximum possible *)
+ mutable tot_mem_kib: int; (* memory in use *)
+ mutable max_mem_kib: int; (* maximum possible *)
mutable vcpus: int;
mutable uuid: int array;
mutable state: xenpowerstate;
@@ -152,13 +152,13 @@
try Hashtbl.find domains domid
with Not_found -> raise Domain_not_found
-(** immediately set the tot_mem to the requested balloon target *)
+(** immediately set the tot_mem_kib to the requested balloon target *)
let read_memory_target xs domid =
let path = Printf.sprintf "/local/domain/%d/memory/target" domid in
try
let mem = xs.Xs.read path in
let dom = domain_find domid in
- dom.tot_mem <- int_of_string mem
+ dom.tot_mem_kib <- int_of_string mem
with e -> eprintf "(XIU) Failed to parse memory target of domid %d\n"
domid
(** Maximum number of dummy<N> devices fixed at module-load time *)
@@ -466,8 +466,8 @@
let newdom = {
domid = newdomid;
hvm = hvm;
- max_mem = 0;
- tot_mem = 0;
+ max_mem_kib = 0;
+ tot_mem_kib = 0;
vcpus = 0;
uuid = uuid;
state = Paused;
@@ -491,7 +491,7 @@
let domain_pause domid = (domain_find domid).state <- Paused
let domain_resume domid = ignore (domain_find domid)
let domain_maxcpus domid vcpus = let dom = domain_find domid in dom.vcpus <-
vcpus
-let domain_maxmem domid mem = let dom = domain_find domid in dom.max_mem <- mem
+let domain_maxmem domid mem = let dom = domain_find domid in dom.max_mem_kib
<- mem
let domain_shadow_allocation domid alloc = let dom = domain_find domid in
dom.shadow_allocation <- alloc
let domain_get_shadow_allocation domid = (domain_find domid).shadow_allocation
@@ -632,8 +632,8 @@
(string_of_int
(domflags_to_int dom));
(string_of_int
dom.vcpus); (* nr_online_vcpus *)
(string_of_int
dom.vcpus); (* max_vcpu_id *)
- (string_of_int
(pages_of_kb dom.tot_mem));
- (string_of_int
(pages_of_kb dom.max_mem));
+ (string_of_int
(pages_of_kb dom.tot_mem_kib));
+ (string_of_int
(pages_of_kb dom.max_mem_kib));
(string_of_int
dom.shared_info_frame);
(string_of_int
dom.cpu_time);
(string_of_int
dom.ssidref);
1 file changed, 9 insertions(+), 9 deletions(-)
ocaml/xiu/xiu.ml | 18 +++++++++---------
xen-api.hg-4.patch
Description: Text Data
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
|
|
|
|
|