|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] tools/libs/light: update xenstore entry when setting max domain memory
On 07.04.22 16:44, Anthony PERARD wrote: On Thu, Mar 31, 2022 at 09:07:55AM +0200, Juergen Gross wrote:libxl_domain_setmaxmem() should update the domain's memory/static-max Xenstore node, as otherwise "xl mem-set" won't be able to set the memory size to the new maximum.`xl mem-set` doesn't call libxl_domain_setmaxmem(), but calls libxl_set_memory_target(). Correct. And it refuses to do so when memory/static-max is below the new memory size to be set. Or maybe you are speaking about `xl mem-max` followed by `xl mem-set`? In this case, it is documented in `man 1 xl` that `mem-max` has no effect to `mem-set`. When having e.g. a domain with 1G of maxmem, then calling xl mem-max <domain> 2048 it should be possible to then do xl mem-set <domain> 2048 but this isn't possible, as xl mem-set will look at the memory/static-max node of the domain and refuse to do the setting if it has a too low value, which is the case today. Oh, this should then be adapted. Today hotplugging memory is just a mess as you need to: xl mem-max <domid> <value> xenstore-write /local/domain/<domid>/memory/static-max $((<value> * 1024)) xl mem-set <domid> <value> Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- tools/libs/light/libxl_mem.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/libs/light/libxl_mem.c b/tools/libs/light/libxl_mem.c index c739d00f39..2f4f9d4a4a 100644 --- a/tools/libs/light/libxl_mem.c +++ b/tools/libs/light/libxl_mem.c @@ -82,6 +82,15 @@ int libxl_domain_setmaxmem(libxl_ctx *ctx, uint32_t domid, uint64_t max_memkb) Yes.
Normally it doesn't care at all. If yes, there's documentation and comments that needs to change with the code change. I agree. Will do so. Juergen Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |