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] Linux mainstream balloon driver fails to grow memory= ->

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: RE: [Xen-devel] Linux mainstream balloon driver fails to grow memory= -> maxmem=
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Mon, 23 Aug 2010 19:11:17 -0700 (PDT)
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Daniel Kiper <dkiper@xxxxxxxxxxxx>, Vasiliy G Tolstov <v.tolstov@xxxxxxxxx>
Delivery-date: Mon, 23 Aug 2010 19:13:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C731769.1050002@xxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <a8aa7cb8-1f20-44ec-a6d5-72e991b0bb6f@default 4C731769.1050002@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> From: Jeremy Fitzhardinge [mailto:jeremy@xxxxxxxx]
> Subject: Re: [Xen-devel] Linux mainstream balloon driver fails to grow
> memory= -> maxmem=
> 
>  On 08/23/2010 04:49 PM, Dan Magenheimer wrote:
> > Hi Jeremy --
> >
> > Vasiliy discovered (and I confirmed) that the mainstream
> > Linux balloon driver won't balloon above the initial
> > memory with which the Linux guest was launched.  E.g.
> > a 2.6.34 guest launched with these in vm.cfg:
> >
> > memory=1024
> > maxmem=1536
> >
> > displays properly in xentop, but changing target_kb
> > in /sys/devices/system/xen_memory/xen_memory0
> > doesn't "take" for any value greater than 1024*1024.
> >
> > We tested with 2.6.34 but it even fails in RHEL6 Beta2.
> >
> > Is this a known problem/bug (or maybe a feature)?
> 
> Known bug.  There's no machinery in there to allocate enough struct
> pages for maxmem, only for "memory".

OK, good to know.

> The immediately workaround is to start the domain with fully populated
> "memory" and then have it balloon out the unwanted stuff asap, but it
> does mean you need to have enough memory to start with.
> 
> There's a couple of experiments floating around in the tree to try to
> honour maxmem, but they're somewhat rotted.  Its probably worth trying
> to resurrect them though.

Not sure, except for backwards compatibility.

> And of course there's Daniel's work which is a more flexible
> andcomprehensive approach, but it does rely on hotplug memory (which
> has
> its own overheads).

Tmem (the "frontswap" part) also takes advantage of the difference
between memory= and maxmem=, allowing pages that are swapped to
"hypervisor RAM" to use RAM between the two numbers.  This requires
that the guest have a swap disk configured that is at least as
large as the difference between memory= and maxmem= though.

So if Daniel's stuff works along with tmem, I'm not too bothered about
fixing this known difference between 2.6.18-xen and mainstream.
And IIRC the maxmem= parameter is required for PoD to work for Windows
also.  IOW, this should probably be documented (any ideas where?)
but the "old way" may best be left to obsolesce with 2.6.18-xen.

Dan

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