[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Disallow setting maxmem to higher value than total physical memory size



On Wed, 2010-09-01 at 14:01 +0100, Michal Novotny wrote:
> On 09/01/2010 02:44 PM, Ian Campbell wrote:
> > On Wed, 2010-09-01 at 13:31 +0100, Michal Novotny wrote:
> >    
> >> Hi,
> >> this is the patch to disallow changing the maxmem value to higher value
> >> than total physical memory size since without this patch I was able to
> >> set dom0 maxmem to higher (invalid) value which is not correct.
> >>      
> > I think it is allowable for a domU though. Consider the scenario where
> > you have two hosts, one of which has more physical RAM than the other.
> >    
> 
> Yeah, that's right. This scenario has been taken into mind and in fact 
> this patch shouldn't do any harm on domU but it was mainly made for dom0 
> since dom0 default maxmem value is being set to 16 GiB on x86_64 machine 
> which is not correct since it allows setting up up to 16 GiB RAM to dom0 
> although we have available only 8 GiB for example. Issuing `xm mem-set 
> 10240` is therefore possible but it shouldn't be so it's trying to 
> reserve 10240. The main issue is that xenstore was having maxmem value 
> of 10240 instead of maximum value possible, i.e. value of 8192 in my 
> case. Since xenstore itself was having the incorrect information it was 
> implemented for xenstore to provide valid information too.

I'm saying that I think your patch does cause have harm on a domU, I
don't see anything which limits its actions to just dom0. Can you
explain why a domU is not effected by this change.

As far as I can tell the patch will prevent the creation of a domU which
has a maxmem larger than the current host is capable of providing. The
maxmem setting is the maximum memory is the amount of memory which the
domain _could_ be given. This is different from the amount it currently
actually has which can be different due to ballooning etc.

A domain must be configured with this maxmem value at boot time because
it may need to dynamically size some of data structures (e.g. the frame
table) to allow it to balloon up at a later date.

Which xenstore node are you talking about?

> > You may which to boot a domain on the smaller host, (i.e. booting
> > ballooned with a current_pages suitable for the small host) and then
> > migrate it to the large machine where you then want to be able to
> > balloon to a value larger than was even possible on the previous
> > machine.
> >
> > If maxmem is not configured to the largest amount you consider you might
> > want to give the domain then this scenario fails but it should work.
> >    
> 
> Well, if maxmem is not configured for PV domain you mean?

Sorry, I meant "If maxmem is not able to be configured to a value larger
than the physical memory on the current host...".

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.