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

[Xen-changelog] [xen-unstable] libxl: libxl_domain_setmaxmem: actually call xc_domain_setmaxmem



# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
# Date 1306418747 -3600
# Node ID 183c1a134e7bea18637e6d37b95a945c2d60907d
# Parent  ecff559bf474487a2bcd5b15a63fd7e75130e6b3
libxl: 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@xxxxxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r ecff559bf474 -r 183c1a134e7b tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Thu May 26 15:04:46 2011 +0100
+++ b/tools/libxl/libxl.c       Thu May 26 15:05:47 2011 +0100
@@ -1795,6 +1795,13 @@
         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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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