[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] memory hotplug for domUs



On 20/01/17 09:26, Juergen Gross wrote:
> Recently Jim asked me why he can use "xl mem-max" to raise the allowed
> memory size of a domain in the hypervisor above the configured maxmem
> limit of the domain, but not use "xl mem-set" to balloon the domain up
> to this value later.
>
> I thought libxl_domain_setmaxmem() being buggy as it doesn't modify the
> memory/static-max value in Xenstore and posted a patch adding the
> Xenstore modification.
>
> Later I had an IRC discussion with Ian on #xendevel with the following
> outcome:
>
> xl mem-max is defined to do things as it does without my patch. OTOH
> this is documented very poorly. I'll send a patch enhancing the xl man
> page in this regard.
>
> For support of memory hotplug in a domain (adding memory above the
> current defined maximum memory as in Xenstore memory/static-max) we
> decided to add a new option to xl.
>
> Basically doing such a kind of memory hotplug requires the capability
> of the guest to support this feature. PV Linux kernel has support for
> it if the kernel has been built with CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
> set. For HVM guests support is more difficult as there has to be some
> reserved space in the memory map of the guest for hotplugged memory.
>
> Ian suggested to let the guest write a Xenstore entry indicating
> support of memory hotplug in order for Xen tools to decide whether such
> an operation should be supported. As this entry isn't being written by
> current kernels which do support hotplug there has to be some kind of
> "force" flag to override the test for presence of the Xenstore entry.
>
> We first thought to enhance "xl mem-set", but after some more thinking
> about it I'd rather add a new xl command, e.g. "mem-add" (we could later
> even add "mem-remove" to support memory unplug).
>
> xl mem-add would add the specified amount of memory to a running domain
> and it would raise memory/static-max accordingly. The first version
> would support PV domains only, but future support for HVM could be
> possible (the domain configuration would have to be enhanced to create
> a memory map entry indicating hot-pluggable memory). Other future
> enhancements would include the possibility to add memory to a vnuma
> node of the domain, possibly taking the memory from a specified numa
> node of the host.
>
> In case this proposal is accepted I can write patches (libxl and Linux
> kernel).

For PV guests, this sounds plausible.

For HVM/PVH guests however, ACPI Memory Hotplug.  That way it will work
for all operating systems, not just Linux.  (Lets please not waste time
building a somewhat-square wheel which only fits on a Linux shaped axle :) )

~Andrew

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.