From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: dom0 not seeing all of the assigned memory Date: Mon, 19 Mar 2012 11:09:32 +0000 Message-ID: <4F6713EC.7070804@citrix.com> References: <4F468B96.5030703@cantab.net> <20120315183330.GB3034@phenom.dumpdata.com> <4F623AD5.3020400@citrix.com> <4F624C02.3000004@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4F624C02.3000004@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: =?ISO-8859-1?Q?Sven_K=F6hler?= Cc: "xen-devel@lists.xensource.com" , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On 15/03/12 20:07, Sven K=F6hler wrote: > Am 15.03.2012 19:54, schrieb David Vrabel: >> On 15/03/12 18:33, Konrad Rzeszutek Wilk wrote: >>> On Sun, Mar 11, 2012 at 11:20:02PM +0100, Sven K=F6hler wrote: >>>> >>>> I have the same problem. I believe this also happens even if the >>>> ballooning driver is disabled in dom0 kernel. >> >> Well, yes. The balloon driver needs to be enabled and a new target set >> to get back the memory released during boot. > = > The dom0 releases pages and passes them back to the hypervisor? > But why does it do so in the first place? Because the pages are not accessible. They overlap with BIOS or device memory. Later kernels are better at releasing more pages than earlier ones and so it may appear that the domain ends up with less pages but it really has the same number of usable pages. >>>>> Make sure you have added the following patch to your Xen if you are >>>>> using a recent >=3D3.1 kernel. Unfortunately it isn't in Xen 4.1.x, b= ut >>>>> I guess it should be added to there: >>>>> http://xenbits.xen.org/hg/staging/xen-unstable.hg/rev/c56dd5eb0fa2 >>>>> >>>>> See if it helps. >>>> >>>> I recompiled the hypervisor (this was a patch for the hypervisor, >>>> right?) and dom0 only has around 413MB inspite of dom0_mem=3D512M >>>> hypervisor parameter. >> >> You need dom0_mem=3Dmax:512M > = > I can't find documentation on what that does. But if I had to make an > educated guess, I would assume that dom0_mem=3Dmax:512M sets an upper > bound on the memory that dom0 may consume. It sounds like, the > hypervisor may take memory away from dom0, so that dom0 drops below the > specified 512MB. The documentation isn't great. dom0_mem sets two memory related limits: a) the initial number of pages; and b) the maximum possible number of pages (maximum reservation). Without the 'max:' option, the maximum reservation is unlimited. Since 3.0.5, Linux has used the minimum of the maximum reservation and the total amount of physical RAM to size its page tables etc. David