All of lore.kernel.org
 help / color / mirror / Atom feed
* memory hotplug for domUs
@ 2017-01-20  9:26 Juergen Gross
  2017-01-20 11:08 ` Andrew Cooper
  2017-01-20 15:54 ` Ian Jackson
  0 siblings, 2 replies; 18+ messages in thread
From: Juergen Gross @ 2017-01-20  9:26 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, Jim Fehlig, Ian Jackson

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).


Juergen

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

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

end of thread, other threads:[~2017-02-03 13:29 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-20  9:26 memory hotplug for domUs Juergen Gross
2017-01-20 11:08 ` Andrew Cooper
2017-01-20 13:50   ` Konrad Rzeszutek Wilk
2017-01-20 14:19     ` Boris Ostrovsky
2017-01-20 14:27       ` Roger Pau Monné
2017-01-20 14:34         ` Juergen Gross
2017-01-20 14:36         ` Boris Ostrovsky
2017-01-20 15:54 ` Ian Jackson
2017-01-20 16:06   ` Juergen Gross
2017-01-20 16:37     ` Ian Jackson
2017-01-20 16:38       ` Juergen Gross
2017-01-24 23:03     ` Jim Fehlig
2017-01-25 13:02       ` Dario Faggioli
2017-02-03 10:04         ` Juergen Gross
2017-02-03 12:19           ` Ian Jackson
2017-02-03 13:16             ` Juergen Gross
2017-02-03 13:23               ` Ian Jackson
2017-02-03 13:29                 ` Juergen Gross

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.