From: "Jan Beulich" Subject: Re: pre-reservation of memory for domain creation Date: Mon, 08 Feb 2010 16:25:33 +0000 Message-ID: <4B70490D020000780002E4AD@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> <20100114124619.GE30054@whitby.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20100114124619.GE30054@whitby.uk.xensource.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: Tim Deegan Cc: Dongxiao Xu , "xen-devel@lists.xensource.com" , Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> Tim Deegan 14.01.10 13:46 >>> >At 09:00 +0000 on 14 Jan (1263459616), Jan Beulich wrote: >> >>> "Xu, Dongxiao" 14.01.10 08:19 >>> >> > Currently guest initialization process in xend (XendDomainInfo.py) = is:=20 >> > >> > _constructDomain() --> domain_create() --> domain_max_vcpus() ... = --> >> > _initDomain() --> shadow_mem_control() ... >>=20 >> While the patch certainly matches what I had in mind, with this = sequence >> 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 >> I wonder though what all this memory is needed for before the domain >> (not to speak of secondary CPUs) actually gets started. If that could = be >> got under control, tools side adjustment would not be necessary. Tim? > >Hmmm. Some shadow memory has to be allocated before the VCPUs are >initialized so that they can be given monitor pagetables etc. Some >shadow memory has to be allocated before the guest's main memory is >assigned because the p2m is built out of shadow memory. So is there a way to quantify that? In particular, is that *initial* amount in any way dependent on the number of vCPU-s? >Fixing the first one should be enough, so long as xend assignd vcpus and >memory before assigning shadow memory properly (which I believe it >does). Patch attached. The full memory assignment happens after vCPU-s got assigned, but the initial assignment happens before. Dongxiao's patch tried to account for that, but neither was that patch accepted so far, nor am I convinced this is really correct or even necessary. I'm re-raising this question because we're not seeming to make any progress towards a satisfactory resolution of the regression c/s 20389 introduced. Jan