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 2 of 8] libxl: introduce libxl_set_relative_memor

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH 2 of 8] libxl: introduce libxl_set_relative_memory_target
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Wed, 1 Sep 2010 13:03:33 -0700 (PDT)
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Wed, 01 Sep 2010 13:06:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C7E94F0.5050802@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: <alpine.DEB.2.00.1008271215210.2545@kaball-desktop> <19581.15132.637644.952724@xxxxxxxxxxxxxxxxxxxxxxxx 4C7E94F0.5050802@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thanks for cc'ing me Jeremy... I saw the posting but missed
the implications (thinking it just a vanilla reimplementation of
"xm memset").

> There needs to be a way to set the maxmem for a domain without also
> setting the memory/target xenstore key, so that you can allow a domain
> to control its own ballooning up to a certain limit without also
> triggering its xenstore watch (which would trigger an external balloon
> target request).

Indeed, that's what selfballooning does.  The xenstore watch
is irrelevant for selfballooning (though the watch also can be used
asynchronously for backwards compatibility).

IMHO, attempts to do memory load balancing externally (e.g. setting
a memory target from tools in dom0) are doomed to failure.  There 
was a discussion of memory "rightsizing" at the recent Linux MM summit;
this is an almost impossible problem even within a single kernel,
though there were heuristics discussed as to how to approach it...
and a better understanding about why in-kernel tmem-ish functionalities
like cleancache and frontswap are useful for mitigating the problems
that occur when rightsizing is approximated.

> There's also the question of how tmem makes use of maxmem - I believe
> it
> allows a domain to use tmem pages up to its maxmem, without actually
> changing the current memory usage in terms of pages mapped into the
> domain.

There are two classes of tmem memory: ephemeral and persistent.
Ephemeral is clean pages that can be discarded at any time and
tmem doesn't count those against maxmem.  Persistent pages
must be retained until the guest that "owns" them flushes
them or dies; these pages DO count against the guest's maxmem
but are not mapped into the domain.

So, frankly, I think the "xm memset" functionality is largely
useless, but agree that it should be maintained in xl for backwards
compatibility.  But trying to comingle the concepts of maxmem
and target is a bad idea.

Dan

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