libxl: setmaxmem functionality?
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
Quoted 5 lines · Markus Groß
Hi,
the function
libxl_domain_setmaxmeminlibxl.cdoesn'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.
Quoted 7 lines · Ian Campbell
Quoted 5 lines · Markus Groß
Hi,
the function
libxl_domain_setmaxmeminlibxl.cdoesn't seem to do anything besides argument checking, or am I overlooking something?
Quoted 6 lines
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).
tools/libxl/libxl.c +7 -0
@@ -1794,6 +1794,13 @@ int libxl_domain_setmaxmem(libxl_ctx *ctLIBXL__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
[email protected]
http://lists.xensource.com/xen-devel
Ian Jackson
Acked-byStefano Stabellini writes ("Re: [Xen-devel] libxl: setmaxmem functionality?"):
Quoted 7 lines
libxl_domain_setmaxmem: actually callxc_domain_setmaxmemCurrently
libxl_domain_setmaxmemdoesn't do anything, but it should callxc_domain_setmaxmemto enforce the new "xen maximum" target for the domain (seetools/libxl/libxl_memory.txt).Signed-off-by Stefano Stabellini <[email protected]>