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/
Home Products Support Community News


RE: [Xen-devel] [PATCH] PoD: Handle operations properly when domain is d

To: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] [PATCH] PoD: Handle operations properly when domain is dying
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Wed, 11 Nov 2009 10:27:10 -0800 (PST)
Delivery-date: Wed, 11 Nov 2009 10:28:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <81A73678E76EA642801C8F2E4823AD2143B74F14EE@xxxxxxxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
(Sorry, George, for hijacking your thread :-)

> > A possibly related issue came up in a team discussion
> > yesterday.  It is not uncommon for management tools to
> > check available memory to decide if there is sufficient
> > space to provision a new domain, for example when choosing
> > a machine on which to start a new domain.  But there is
> > no "lock" so if the answer is yes and the machine
> > is chosen, but moments later some memory becomes used
> > (by PoD or ballooning or ???), domain creation might
> > fail due to insufficient memory.
> In the xapi toolstack world we assume that all domains on a 
> host will be able to balloon down to their "dynamic_min" and 
> use this in our host-choosing logic. We bias the choice of 
> host towards the ones with the most memory free... but 
> ultimately if the guests don't respond then we'll still get 
> an out-of-memory error.
> We're also writing/debugging a host ballooning daemon which 
> you can ask to reserve memory for stuff like a domain 
> creation. It asks the domains to balloon down and then makes 
> sure they stay down by setting maxmem. I'm in the middle of 
> writing up how it's supposed to work, I'll send a link around 
> for comments when I have a draft.

Great!  I'm definitely interested!

> > Tmem has a "freeze" feature to avoid this problem, but
> > tmem has the advantage that all domains will continue
> > to function even if tmem is frozen... I'm not sure
> > that's true for PoD.
> This sounds interesting -- do you have a link to a document somewhere?

Tmem is fully implemented in xen-unstable in both Xen
and the xm tools, but it currently needs to be turned
on by a boot option and does nothing without a tmem-modified
guest kernel.

There's a lot of generic description of tmem at
but as of now the only description of tmem-freeze is
in the code.  Let me know if you have any general
questions and I will try to answer.

Note however that the concept of "free memory" changes
a lot on any system with a guest using tmem.  There is
now "free memory" and "freeable memory" and the sum of
the two is memory that is available for other purposes
such as domain creation.


Xen-devel mailing list