On Wed, 25 May 2011, Ian Campbell wrote:> On Wed, 2011-05-25 at 09:33 +0100, Markus Groß wrote:
> > Hi,
> >
> > the function libxl_domain_setmaxmem in libxl.c doesn''t
> > seem to do anything besides argument checking,
> > or am I overlooking something?
>
> Um, no, you appear to be quite correct. How strange!
>
> It seems like the actual meat of the function was removed in
> 22196:4f90c1fde133. The changelog message mentions massaging the patch
> due to some unrelated code motion -- perhaps something went wrong there?
> IanJ and Stefano CCd.
22196 is correct: static-max shouldn''t be changed there.
The problem is that libxl_domain_setmaxmem doesn''t call
xc_domain_setmaxmem.
---
libxl_domain_setmaxmem: actually call xc_domain_setmaxmem
Currently libxl_domain_setmaxmem doesn''t do anything, but it should
call
xc_domain_setmaxmem to enforce the new "xen maximum" target for the
domain (see tools/libxl/libxl_memory.txt).
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
diff -r 37c77bacb52a tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Mon May 23 17:38:28 2011 +0100
+++ b/tools/libxl/libxl.c Wed May 25 12:06:28 2011 +0000
@@ -1794,6 +1794,13 @@ int libxl_domain_setmaxmem(libxl_ctx *ct
LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "memory_static_max must be
greater than or or equal to memory_dynamic_max\n");
goto out;
}
+ rc = xc_domain_setmaxmem(ctx->xch, domid, max_memkb +
LIBXL_MAXMEM_CONSTANT);
+ if (rc != 0) {
+ LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
+ "xc_domain_setmaxmem domid=%d memkb=%d failed "
+ "rc=%d\n", domid, max_memkb + LIBXL_MAXMEM_CONSTANT,
rc);
+ goto out;
+ }
rc = 0;
out:
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel