* libxl: setmaxmem functionality?
@ 2011-05-25 8:33 Markus Groß
2011-05-25 8:38 ` Ian Campbell
0 siblings, 1 reply; 4+ messages in thread
From: Markus Groß @ 2011-05-25 8:33 UTC (permalink / raw)
To: xen-devel
Hi,
the function libxl_domain_setmaxmem in libxl.c doesn't
seem to do anything besides argument checking,
or am I overlooking something?
Cheers,
Markus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libxl: setmaxmem functionality?
2011-05-25 8:33 libxl: setmaxmem functionality? Markus Groß
@ 2011-05-25 8:38 ` Ian Campbell
2011-05-25 12:12 ` Stefano Stabellini
0 siblings, 1 reply; 4+ messages in thread
From: Ian Campbell @ 2011-05-25 8:38 UTC (permalink / raw)
To: Markus Groß; +Cc: Ian Jackson, xen-devel, Stabellini, Stefano
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.
Ian.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libxl: setmaxmem functionality?
2011-05-25 8:38 ` Ian Campbell
@ 2011-05-25 12:12 ` Stefano Stabellini
2011-05-26 14:06 ` Ian Jackson
0 siblings, 1 reply; 4+ messages in thread
From: Stefano Stabellini @ 2011-05-25 12:12 UTC (permalink / raw)
To: Ian Campbell; +Cc: Ian Jackson, xen-devel, Stabellini, Markus Groß
[-- Attachment #1: Type: text/plain, Size: 1766 bytes --]
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:
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libxl: setmaxmem functionality?
2011-05-25 12:12 ` Stefano Stabellini
@ 2011-05-26 14:06 ` Ian Jackson
0 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2011-05-26 14:06 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: Ian Campbell, xen-devel, Markus Groß
Stefano Stabellini writes ("Re: [Xen-devel] libxl: setmaxmem functionality?"):
> 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>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-26 14:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-25 8:33 libxl: setmaxmem functionality? Markus Groß
2011-05-25 8:38 ` Ian Campbell
2011-05-25 12:12 ` Stefano Stabellini
2011-05-26 14:06 ` Ian Jackson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.