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 7] [XIU]: rename tot_mem -> tot_mem_kib and max_me

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 2 of 7] [XIU]: rename tot_mem -> tot_mem_kib and max_mem -> max_mem_kib
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Fri, 27 Nov 2009 22:47:27 +0000
Delivery-date: Fri, 27 Nov 2009 14:46:21 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1259362045@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 1259361887 0
# Node ID e689f715a442831262e908bdb333bd43368f8eaf
# Parent  9b40d09867ba38225562945a9fe4f043757e6f8f
[XIU]: rename tot_mem -> tot_mem_kib and max_mem -> max_mem_kib

Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>

diff -r 9b40d09867ba -r e689f715a442 ocaml/xiu/xiu.ml
--- a/ocaml/xiu/xiu.ml  Fri Nov 27 22:44:46 2009 +0000
+++ b/ocaml/xiu/xiu.ml  Fri Nov 27 22:44:47 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-7.patch
Description: Text Data

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