docs: clarify xl mem-max semantics
authorJuergen Gross <jgross@suse.com>
Fri, 27 Jan 2017 11:45:18 +0000 (12:45 +0100)
committerWei Liu <wei.liu2@citrix.com>
Fri, 27 Jan 2017 12:06:48 +0000 (12:06 +0000)
The information given in the xl man page for the mem-max command is
rather brief. Expand it in order to let the reader understand what it
is really doing.

As the related libxl function libxl_domain_setmaxmem() isn't much
clearer add a comment to it explaining the desired semantics.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
docs/man/xl.pod.1.in
tools/libxl/libxl.c

index 09c1faae131ea092777c8c8806f0248bbce64358..7caed088bf14f9478ec3bb03c758438855185f55 100644 (file)
@@ -401,6 +401,16 @@ for bytes.
 The mem-max value may not correspond to the actual memory used in the
 domain, as it may balloon down its memory to give more back to the OS.
 
+The value given just sets the memory amount the domain is allowed to allocate
+in the hypervisor. It can't be set lower than the current reservation, but
+it is allowed to be higher than the configured maximum memory size of the
+domain (B<maxmem> parameter in the domain's configuration). Using B<xl mem-max>
+to set the maximum memory above the initial B<maxmem> value will not allow the
+additional memory to be used via B<xl mem-set>. The initial B<maxmem> value is
+still used as an upper limit for B<xl mem-set>.
+
+The domain is not receiving any signal regarding the changed memory limit.
+
 =item B<mem-set> I<domain-id> I<mem>
 
 Set the domain's used memory using the balloon driver; append 't' for
index 0622311a1e7b4941e7001f12d8261f6cd470a7b1..d400fa2ef3233a0ea40ab2aa22ffc0d0f492f70d 100644 (file)
@@ -4018,6 +4018,12 @@ out:
 
 /******************************************************************************/
 
+/*
+ * Set the maximum memory size of the domain in the hypervisor. There is no
+ * change of the current memory size involved. The specified memory size can
+ * even be above the configured maxmem size of the domain, but the related
+ * Xenstore entry memory/static-max isn't modified!
+ */
 int libxl_domain_setmaxmem(libxl_ctx *ctx, uint32_t domid, uint64_t max_memkb)
 {
     GC_INIT(ctx);