From: Keir Fraser Subject: Re: [PATCH] balloon: selfballooning and post memory info via xenbus, Date: Thu, 22 May 2008 08:18:41 +0100 Message-ID: References: <48351D9D.7070709@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <48351D9D.7070709@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Chris Lalancette , "dan.magenheimer@oracle.com" Cc: "xen-devel@lists.xensource.com" , Torben Viets List-Id: xen-devel@lists.xenproject.org On 22/5/08 08:15, "Chris Lalancette" wrote: >> 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 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. This is certainly how it is supposed to still work! -- Keir