[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Fix inverted sense of getRequiredAvailableMemory and
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |