[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] increase initial memory reservation for stubdom based HVM domains
Hi all, this patch requests 32 additional MB of free RAM from dom0 when an HVM domain is started, if the device model for the domain is provided by a stubdom. This way there is no risk that a stubdom fails to populate the videoram because the RAM freed for the videoram by dom0 has already been used to create the stubdom. Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> diff -r 10a8fae412c5 tools/python/xen/xend/image.py --- a/tools/python/xen/xend/image.py Wed Jan 14 13:43:17 2009 +0000 +++ b/tools/python/xen/xend/image.py Thu Jan 15 16:33:26 2009 +0000 @@ -838,6 +838,7 @@ HVMImageHandler.configure(self, vmConfig) self.vhpt = int(vmConfig['platform'].get('vhpt', 0)) self.vramsize = int(vmConfig['platform'].get('videoram',4)) * 1024 + self.use_stubdom = (vmConfig['platform'].get('device_model').find('stubdom-dm') >= 0) def buildDomain(self): xc.nvram_init(self.vm.getName(), self.vm.getDomid()) @@ -853,6 +854,8 @@ extra_pages = 1024 + 5 mem_kb += extra_pages * page_kb mem_kb += self.vramsize + if self.use_stubdom : + mem_kb += 32 * 1024 return mem_kb def getRequiredInitialReservation(self): @@ -888,6 +891,7 @@ HVMImageHandler.configure(self, vmConfig) self.pae = int(vmConfig['platform'].get('pae', 0)) self.vramsize = int(vmConfig['platform'].get('videoram',4)) * 1024 + self.use_stubdom = (vmConfig['platform'].get('device_model').find('stubdom-dm') >= 0) def buildDomain(self): xc.hvm_set_param(self.vm.getDomid(), HVM_PARAM_PAE_ENABLED, self.pae) @@ -896,7 +900,10 @@ return rc def getRequiredAvailableMemory(self, mem_kb): - return mem_kb + self.vramsize + mem_kb += self.vramsize + if self.use_stubdom : + mem_kb += 32 * 1024 + return mem_kb def getRequiredInitialReservation(self): return self.vm.getMemoryTarget() _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |