Further shadow_mem_control fixes -- we need to balloon the amount of memory

that we're going to request i.e. the rounded-up value.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
Ewan Mellor committed 2006-08-30 11:05:00 +01:00
1 parent b973ec93fc
commit 34784d695b
1 file changed
+3 -3
+3 -3
View File
@@ -1296,13 +1296,13 @@ class XendDomainInfo:
shadow_kb_req = self.info['shadow_memory'] * 1024
if shadow_kb_req > shadow_kb:
shadow_kb = shadow_kb_req
shadow_mb = (shadow_kb + 1023) / 1024
# Make sure there's enough RAM available for the domain
balloon.free(mem_kb + shadow_kb)
balloon.free(mem_kb + shadow_mb * 1024)
# Set up the shadow memory
shadow_cur = xc.shadow_mem_control(self.domid,
(shadow_kb + 1023) / 1024)
shadow_cur = xc.shadow_mem_control(self.domid, shadow_mb)
self.info['shadow_memory'] = shadow_cur
# initial memory allocation
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.