From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: memory size inside domU less than memory in domU config Date: Mon, 20 Jun 2011 10:36:11 -0400 Message-ID: <20110620143611.GA15251@dumpdata.com> References: <1308248350.28653.5.camel@mobile> <4DFB3FD50200007800047F63@nat28.tlf.novell.com> <1308304996.524.0.camel@vase> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1308304996.524.0.camel@vase> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Vasiliy G Tolstov Cc: xen-devel@lists.xensource.com, Jan Beulich List-Id: xen-devel@lists.xenproject.org On Fri, Jun 17, 2011 at 02:03:16PM +0400, Vasiliy G Tolstov wrote: > On Fri, 2011-06-17 at 10:51 +0100, Jan Beulich wrote: > > >>> On 16.06.11 at 20:19, Vasiliy G Tolstov wrote: > > > Hello. I'm try to use linux-3.0.0-rc1 in domU. > > > Domain created with memory=2048 and maxmemory=4096. Inside domU i have > > > cat /proc/meminfo | grep MemTotal > > > MemTotal: 2016564 kB > > > > > > Why. Kernel boot log and config in attached files. How can i minimize > > > memory difference with config value and inside domU? > > > > Did you ever look at MemTotal on a physical machine with 2Gb installed? > > > I do not have 2Gb, but have 1Gb > cat /proc/meminfo > MemTotal: 1021320 kB > > this is smaller than 1024, but not to 78Mb.. So I tried the same experiment - a physical machine with 'mem=1G' provided and an PV guest with 'mem=1G'. The same exact kernel in both cases and got: Machine with 'mem=1G' on the command line. [ 0.000000] Memory: 1022756k/1048576k available (5851k kernel code, 452k absent, 25368k reserved, 2881k data, 688k init) PV guest: [ 0.000000] Memory: 1018888k/1048576k available (5851k kernel code, 448k absent, 29240k reserved, 2881k data, 688k init) So a DomU guest "eats" an extra 4MB compared to running it under baremetal. (Note, the DomU guest has no balloon space in this example). The memblock=debug does provide the info of what the "other" reserved regions are and it looks to be the matter of just going through the numbers to figure out what it is.