WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [PATCH] balloon: selfballooning and post memory info via

To: "Chris Lalancette" <clalance@xxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] balloon: selfballooning and post memory info via xenbus,
From: "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx>
Date: Thu, 22 May 2008 11:31:26 -0600
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Torben Viets <viets@xxxxxxx>
Delivery-date: Thu, 22 May 2008 10:33:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <48351D9D.7070709@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Oracle Corporation
Reply-to: "dan.magenheimer@xxxxxxxxxx" <dan.magenheimer@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aci8MagnB/z9BLx1Ti28jGD0EvDTUA==
I stand corrected... it does work for PV guests... but
not for HVM guests (at least not the ones I've tested with).
Also changing the PV guest's balloon target will work,
instead of mem-set.

Interesting...

What is the mechanism behind this?  Is memory-hotplug used?
(It appears to not be configured in my pv guest.)  Or
is the pv kernel actually booted with maxmem MB and the
balloon driver immediately steals memory down to "memory="?
(I'm wondering, for example, if the number of "struct page"s
to handle maxmem is allocated at guest kernel boot, or
increased when memory is increased.)

A pointer to the code implementing this mechanism would
also be helpful!

Thanks,
Dan

> -----Original Message-----
> From: Chris Lalancette [mailto:clalance@xxxxxxxxxx]
> Sent: Thursday, May 22, 2008 1:16 AM
> To: dan.magenheimer@xxxxxxxxxx
> Cc: Torben Viets; xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] [PATCH] balloon: selfballooning and 
> post memory
> info via xenbus,
> 
> 
> Dan Magenheimer wrote:
> >>> memory = 256
> >>> maxmem = 8192
> >
> > By the way, I'm not sure if you knew this, but the above two
> > lines don't work as you might want.  The maxmem is ignored.
> > The domain is launched (in this example) with 256MB of
> > memory and (at least without hot-plug memory support in the
> > guest) memory can only be decreased from there, not increased.
> 
> Assuming we are talking about PV guests, I think this is 
> wrong.  My knowledge is
> a little dated (mostly 3.1.x series knowledge), but unless it 
> has changed, this
> should work.  As I understand it, what happens is that if you 
> specify like
> above, dom0 gets ballooned down 256MB, and then your domain 
> is started with
> 256MB.  From there, you should be able to use xm mem-set 
> <domid> <MB> to set the
> amount of memory in the guest, up to maxmem.
> 
> But there is a big caveat, which trips people up all of the 
> time.  The xm
> mem-set command will *not* automatically balloon down dom0 
> for you.  So if you
> allocated all memory to dom0 on bootup (say, 4GB), then 
> started just this one
> guest (so now dom0 == 3.75GB, domU == 256MB), and try to xm 
> mem-set, you will
> fail.  If you then xm mem-set 0 3000 (or something), you 
> would then be able to
> balloon up the domU an additional .75GB.
> 
> Chris Lalancette
>


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