xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] docs: clarify xl mem-max semantics
@ 2017-01-20  9:54 Juergen Gross
  2017-01-20 13:48 ` Konrad Rzeszutek Wilk
  2017-01-20 23:15 ` Jim Fehlig
  0 siblings, 2 replies; 6+ messages in thread
From: Juergen Gross @ 2017-01-20  9:54 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

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>
---
 docs/man/xl.pod.1.in | 10 ++++++++++
 tools/libxl/libxl.c  |  6 ++++++
 2 files changed, 16 insertions(+)

diff --git a/docs/man/xl.pod.1.in b/docs/man/xl.pod.1.in
index 09c1faa..62307e8 100644
--- a/docs/man/xl.pod.1.in
+++ b/docs/man/xl.pod.1.in
@@ -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. Thus it can't be 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). Setting the
+allowed memory size via B<xl mem-max> above the B<maxmem> size won't let use
+this value to be used for B<xl mem-set>, as B<xl mem-set> will still use
+B<maxmem> as an upper limit.
+
+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
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 0622311..ed59510 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -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 allowed 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);
-- 
2.10.2


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-23  6:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-20  9:54 [PATCH] docs: clarify xl mem-max semantics Juergen Gross
2017-01-20 13:48 ` Konrad Rzeszutek Wilk
2017-01-20 15:51   ` Ian Jackson
2017-01-20 16:13     ` Juergen Gross
2017-01-20 23:15 ` Jim Fehlig
2017-01-23  6:07   ` Juergen Gross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).