[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Xl mem-max does nothing

On Wed, Jul 23, 2014 at 02:28:24PM +0200, Nerilaunt wrote:
> Hi,
> > There might be some semantic changes for these two commands from 4.1 to
> > 4.4. I can't say for sure because I never played with 4.1.
> >
> > If you want your guest to have 512MB ram at most, you can set it as
> > maxmem=512 in guest config file. During guest runtime the guest can use
> > up to 256MB ram (memory= option). Then you can use 'xl mem-set vmname
> > 512' to lift the cap.
> Yes, i can do that, but if I want to allow my DomU to have physical
> server max memory available (and start with 256Mo) I will lost a lot
> of memory, like described here :
> http://lists.xen.org/archives/html/xen-users/2012-05/msg00344.html
> So it's not really a solution.
> I didn't have this problem with xm ...


--- xen-4.4.0/tools/libxl/libxl_dom.c.orig      2014-03-25 20:39:53.262048880 
+++ xen-4.4.0/tools/libxl/libxl_dom.c   2014-03-25 20:40:19.980322730 +0000
@@ -237,7 +237,7 @@
     libxl_domain_set_nodeaffinity(ctx, domid, &info->nodemap);
     libxl_set_vcpuaffinity_all(ctx, domid, info->max_vcpus, &info->cpumap);

-    if (xc_domain_setmaxmem(ctx->xch, domid, info->target_memkb +
+    if (xc_domain_setmaxmem(ctx->xch, domid, info->max_memkb +
         LIBXL_MAXMEM_CONSTANT) < 0) {
         LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Couldn't set max memory");
         return ERROR_FAIL;

will get xl to respect the case where max-mem > memory during domain creation.  
However using tmem with this 
patch can lead to problems with the oom killer being invoked.  If you start 
with the maximum memory you want and 
then balloon down this does not seem to be a problem.  See "Kernel 3.11 / 3.12 
OOM killer and Xen ballooning" 
thread on xen-devel.


Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.