direct-io.hg

changeset 14991:ede8db6534ef

xend: Ensure 2MB free before creating any domain. All domain creations
have an implicit memory overhead.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Tue May 01 10:20:55 2007 +0100 (2007-05-01)
parents 26643b7b48b9
children 9ceacd71949b
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Tue May 01 10:18:11 2007 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Tue May 01 10:20:55 2007 +0100
     1.3 @@ -1419,9 +1419,13 @@ class XendDomainInfo:
     1.4                  raise VmError("HVM guest support is unavailable: is VT/AMD-V "
     1.5                                "supported by your CPU and enabled in your "
     1.6                                "BIOS?")
     1.7 -            # Hack to pre-reserve some memory for HVM setup.
     1.8 -            # Needed because Xen allocates 1MB by default immediately.
     1.9 -            balloon.free(2*1024) # 2MB should be plenty
    1.10 +
    1.11 +        # Hack to pre-reserve some memory for initial domain creation.
    1.12 +        # There is an implicit memory overhead for any domain creation. This
    1.13 +        # overhead is greater for some types of domain than others. For
    1.14 +        # example, an x86 HVM domain will have a default shadow-pagetable
    1.15 +        # allocation of 1MB. We free up 2MB here to be on the safe side.
    1.16 +        balloon.free(2*1024) # 2MB should be plenty
    1.17  
    1.18          self.domid = xc.domain_create(
    1.19              domid = 0,