From: "Jan Beulich" Subject: RE: pre-reservation of memory for domain creation Date: Thu, 14 Jan 2010 09:36:08 +0000 Message-ID: <4B4EF3980200007800029E89@vpn.id2.novell.com> References: <4B4CA40C0200007800029657@vpn.id2.novell.com> <4B4CAEB9020000780002969A@vpn.id2.novell.com> <6CADD16F56BC954D8E28F3836FA7ED7112A79326F2@shzsmsx501.ccr.corp.intel.com> <4B4D8A9402000078000299C3@vpn.id2.novell.com> <6CADD16F56BC954D8E28F3836FA7ED7112A7932EBF@shzsmsx501.ccr.corp.intel.com> <4B4EEB300200007800029E45@vpn.id2.novell.com> <6CADD16F56BC954D8E28F3836FA7ED7112A7932FCC@shzsmsx501.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <6CADD16F56BC954D8E28F3836FA7ED7112A7932FCC@shzsmsx501.ccr.corp.intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dongxiao Xu Cc: Tim Deegan , "xen-devel@lists.xensource.com" , Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> "Xu, Dongxiao" 14.01.10 10:09 >>> >Jan Beulich wrote: >> it is clear that the tools still will need adjustment: The full >> ballooning only happens from _initDomain(), and hence the >> pre-reservation (from _constructDomain) of 4Mb would still be too >> small for large vCPU counts.=20 > >The pre-reservation of memory size should be no relationship with >vcpu number. As vcpu hasn't been initialized at that point. On vcpu >initialization, the patch has ballooned the shadow size to 128 pages >per vcpu. Did you find some piece of code that use the pre-reserved >memory to allocate vcpu-related memory?=20 Your patch adds a call to sh_set_allocation() in a call tree starting at XEN_DOMCTL_max_vcpus. That in turn originates from the call to xc.domain_max_vcpus() in the tools, which happens between the pre-reservation (_constructDomain()) and the full ballooning (_initDomain()). Hence at this point only a maximum of 4Mb (as stated before, with an unknown fraction of it being suitable) can be assumed to be available in Xen, but 128 vCPU-s require 64Mb. In order to make the pre-reservation not more complicated (and error prone), I was asking whether (and if so, how and why) this memory really is needed this early. Jan