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 7 of 7] [XIU]: increase the realism of the hypercall si

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 7 of 7] [XIU]: increase the realism of the hypercall simulator by adding a constant amount of extra memory to tot_pages for every domain
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Fri, 27 Nov 2009 22:47:32 +0000
Delivery-date: Fri, 27 Nov 2009 14:47: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 1259361893 0
# Node ID 4985d668283114620078ad440b71081a22fa0e6d
# Parent  725caf683ec94688154459a8e6bc650cf2d03be0
[XIU]: increase the realism of the hypercall simulator by adding a constant 
amount of extra memory to tot_pages for every domain.

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

diff -r 725caf683ec9 -r 4985d6682831 ocaml/xiu/xiu.ml
--- a/ocaml/xiu/xiu.ml  Fri Nov 27 22:44:51 2009 +0000
+++ b/ocaml/xiu/xiu.ml  Fri Nov 27 22:44:53 2009 +0000
@@ -38,6 +38,8 @@
 let physical_memory_kib = ref (4 * 1024 * 1024) (* by default 4gb of memory *)
 let host_m = Mutex.create ()
 
+let extra_kib = 512
+
 (** utility *)
 let create_unix_socket name =
        Unixext.unlink_safe name;
@@ -73,6 +75,7 @@
        hvm: bool;
        mutable tot_mem_kib: int; (* memory in use *)
        mutable max_mem_kib: int; (* maximum possible *)
+       mutable extra_kib: int;
        mutable vcpus: int;
        mutable uuid: int array;
        mutable state: xenpowerstate;
@@ -505,6 +508,7 @@
                hvm = hvm;
                max_mem_kib = 0;
                tot_mem_kib = 0;
+               extra_kib = extra_kib;
                vcpus = 0;
                uuid = uuid;
                state = Paused;
@@ -674,7 +678,7 @@
                                                       (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_kib));
+                                                      (string_of_int 
(pages_of_kb (dom.tot_mem_kib + dom.extra_kib)));
                                                       (string_of_int 
(pages_of_kb dom.max_mem_kib));
                                                       (string_of_int 
dom.shared_info_frame);
                                                       (string_of_int 
dom.cpu_time);
1 file changed, 5 insertions(+), 1 deletion(-)
ocaml/xiu/xiu.ml |    6 +++++-


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

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