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 0 of 9] v2: xl/libxl autoballooning

To: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH 0 of 9] v2: xl/libxl autoballooning
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Fri, 27 Aug 2010 18:51:53 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Fri, 27 Aug 2010 10:52:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <03559ee5-6ae5-41e9-87ba-2c9f7d9a4c04@default>
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: <alpine.DEB.2.00.1008271440231.2545@kaball-desktop> <03559ee5-6ae5-41e9-87ba-2c9f7d9a4c04@default>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Fri, 27 Aug 2010, Dan Magenheimer wrote:
> Hi Stefano --
> 
> I'm glad you have been working on this for xl since this dom0
> capability is also the foundation for ensuring domain creation works
> properly when tmem is both enabled on Xen and enabled on one or more
> running guests.  In that situation, tmem absorbs much (or even
> all) of the free memory in the system, much like dom0 starts
> with all the memory and must surrender it to start other guests.
> One big difference though is that dom0 doesn't asynchronously
> grow and claim the memory back, which can happen with tmem.
> Tmem has functionality to cover this case though.
> 
> I'm not able to work on this right now... it will probably
> be a few weeks before I can, due to various constraints.  But
> since you have just implemented this, I'm sure it is fresh
> in your brain and you may be able to check or update your
> patch to ensure it will easily support tmem as well.
> Perhaps you can at least insert comments at the points
> where you think the tmem hooks would be necessary?  Or if
> you insert actual code that works with tmem disabled,
> I can try/debug it later with tmem enabled?  Either way
> would make it much easier for me to finish the job later.
> 

I think you'll find very easy to add tmem support on top of this series
because the way it works is very similar to what xend does now.

In fact after trying few other approaches and throwing them away because
either too hard or racy, I decided to go for the very simple "global
lock" method.  So right before building the domain in the create_domain
function xl acquires a lock and calls freemem.  Freemem is an xl
function, very similar to the free function in balloon.py in xend, that
calculates how much memory the new domain needs and frees it, using libxl
memory management functions.
Adding few libxl tmem calls in freemem should do the job.




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