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-changelog

[Xen-changelog] [xen-unstable] Fix inverted sense of getRequiredAvailabl

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix inverted sense of getRequiredAvailableMemory and
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 05 Sep 2006 16:50:13 +0000
Delivery-date: Tue, 05 Sep 2006 09:50:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 0419253c81de598d60d1356ab6cd7646688608e3
# Parent  323a89a3c01c6c1c0b421b5ff9877ab3d3b31364
Fix inverted sense of getRequiredAvailableMemory and
getRequiredInitialReservation on x86 HVM.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/image.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff -r 323a89a3c01c -r 0419253c81de tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Tue Sep 05 15:35:42 2006 +0100
+++ b/tools/python/xen/xend/image.py    Tue Sep 05 16:23:11 2006 +0100
@@ -448,6 +448,10 @@ class X86_HVM_ImageHandler(HVMImageHandl
     ostype = "hvm"
 
     def getRequiredAvailableMemory(self, mem_kb):
+        # Add 8 MiB overhead for QEMU's video RAM.
+        return self.getRequiredInitialReservation(mem_kb) + 8192
+
+    def getRequiredInitialReservation(self, mem_kb):
         page_kb = 4
         # This was derived emperically:
         #   2.4 MB overhead per 1024 MB RAM
@@ -456,14 +460,10 @@ class X86_HVM_ImageHandler(HVMImageHandl
         extra_pages = int( math.ceil( extra_mb*1024 / page_kb ))
         return mem_kb + extra_pages * page_kb
 
-    def getRequiredInitialReservation(self, mem_kb):
-        # Add 8 MiB overhead for QEMU's video RAM.
-        return self.getRequiredAvailableMemory(mem_kb) + 8192
-
     def getRequiredShadowMemory(self, shadow_mem_kb, maxmem_kb):
         # The given value is the configured value -- we need to include the
-        # overhead due to getRequiredMemory.
-        maxmem_kb = self.getRequiredMemory(maxmem_kb)
+        # overhead due to getRequiredInitialReservation.
+        maxmem_kb = self.getRequiredInitialReservation(maxmem_kb)
 
         # 1MB per vcpu plus 4Kib/Mib of RAM.  This is higher than 
         # the minimum that Xen would allocate if no value were given.

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix inverted sense of getRequiredAvailableMemory and, Xen patchbot-unstable <=