WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH 2 of 4] [XIU]: rename tot_mem -> tot_mem_kib and max_me

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 2 of 4] [XIU]: rename tot_mem -> tot_mem_kib and max_mem -> max_mem_kib
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Tue, 24 Nov 2009 18:34:39 +0000
Delivery-date: Tue, 24 Nov 2009 10:32:24 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1259087677@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# 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 +++++++++---------


Attachment: xen-api.hg-4.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api