From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] increase initial memory reservation for stubdom based HVM domains
Date: Thu, 15 Jan 2009 16:46:00 +0000 [thread overview]
Message-ID: <496F6848.5040800@eu.citrix.com> (raw)
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@eu.citrix.com>
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()
next reply other threads:[~2009-01-15 16:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-15 16:46 Stefano Stabellini [this message]
2009-01-15 17:04 ` [PATCH] increase initial memory reservation for stubdom based HVM domains Keir Fraser
2009-01-15 17:08 ` Stefano Stabellini
2009-01-15 17:34 ` Keir Fraser
2009-01-15 17:44 ` Samuel Thibault
2009-01-15 17:59 ` Stefano Stabellini
2009-01-15 18:34 ` Trolle Selander
2009-01-15 17:42 ` Samuel Thibault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=496F6848.5040800@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.