From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH] x86: use 'dom0_mem' to limit the number of pages for dom0 Date: Mon, 15 Aug 2011 20:31:58 -0400 Message-ID: <20110816003158.GA26540@dumpdata.com> References: <1ec6c392d40f37032b0c.1313431713@qabil> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1ec6c392d40f37032b0c.1313431713@qabil> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: David Vrabel Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Mon, Aug 15, 2011 at 07:08:33PM +0100, David Vrabel wrote: > # HG changeset patch > # User David Vrabel > # Date 1313404957 -3600 > # Node ID 1ec6c392d40f37032b0c845094c7ee6ba69740fd > # Parent 8d6edc3d26d26931f3732a2008fb4818bc7bab2d > x86: use 'dom0_mem' to limit the number of pages for dom0 > > Use the 'dom0_mem' command line option to set the maximum number of > pages for dom0. dom0 can use then use the XENMEM_maximum_reservation > memory op to automatically find this limit and reduce the size of any > page tables etc. So .. I was actually curious about this -how did this use to work with 2.6.18? In there, if you did 'dom0_mem=max:2GB' it would limit the amount of memory - so how does it do that? > > Signed-off-by: David Vrabel > > diff -r 8d6edc3d26d2 -r 1ec6c392d40f xen/arch/x86/domain_build.c > --- a/xen/arch/x86/domain_build.c Sat Aug 13 10:14:58 2011 +0100 > +++ b/xen/arch/x86/domain_build.c Mon Aug 15 11:42:37 2011 +0100 > @@ -254,6 +254,8 @@ static unsigned long __init compute_dom0 > } > #endif > > + d->max_pages = min(max_pages, avail); > + don't you need the amount of p2m as well? Or is that all limited by d->max_pages? > return nr_pages; > } > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel