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

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



Hello,

> http://lists.xenproject.org/archives/html/xen-devel/2013-10/msg02238.html
>
> --- xen-4.4.0/tools/libxl/libxl_dom.c.orig      2014-03-25 20:39:53.262048880 
> +0000
> +++ 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;

Seems better !
But not perfect : with an old 3.7.1 kernel it works good (adding
memory, removing, lot of times). With our 3.15.6 not.

In the DomU, I see

  /sys/bus/xen_memory/devices/xen_memory0/target_kb

is correctly updated, but

  /sys/bus/xen_memory/devices/xen_memory0/info/current_kb

is not. Sometimes it's limited to 2048000kb (I start DomU with
1024MB), sometimes to 3096000kb ...

I see in DomU's dmesg

  xen:balloon: reserve_additional_memory: add_memory() failed: -17

Balloon driver is compiled in kernel.

  cat /boot/config-3.15.6 | grep XEN_BALLOON
    CONFIG_XEN_BALLOON=y
    CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y

There are a lot of changes in drivers/xen/balloon.c between this 2
versions, so I don't know if it's a bug here or somewhere else.

> 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.

We don't use tmem so it should not be a problem. I tried to understand
the thread but ... it's quite hard.

Thanks,

Neri

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

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