Hi,
I am sending next version of memory hotplug
support for Xen balloon driver patch. It applies
to Linus' git tree, v2.6.38-rc3 tag. Most of
suggestions were taken into account. Thanks for
everybody who tested and/or sent suggestions
to my work.
There are a few prerequisite patches which fixes
some problems found during work on memory hotplug
patch or add some futures which are needed by
memory hotplug patch.
Full list of fixes/futures:
- mm: Add add_registered_memory() to memory hotplug API,
- xen/balloon: Removal of driver_pages,
- xen/balloon: HVM mode support,
- xen/balloon: Migration from mod_timer() to schedule_delayed_work(),
- xen/balloon: Protect against CPU exhaust by event/x process,
- xen/balloon: Minor notation fixes,
- xen/balloon: Memory hotplug support for Xen balloon driver.
Additionally, I suggest to apply patch prepared by Steffano Stabellini
(https://lkml.org/lkml/2011/1/31/232) which fixes memory management
issue in Xen guest. I was not able boot guest machine without
above mentioned patch.
I have received notice that this series of patches broke
machine migration under Xen. I am going to solve that problem ASAP.
I do not have received any notices about other problems till now.
Daniel
On Thu, 2011-02-03 at 17:23 +0100, Daniel Kiper wrote:
> Hi,
>
> I am sending next version of memory hotplug
> support for Xen balloon driver patch. It applies
> to Linus' git tree, v2.6.38-rc3 tag. Most of
> suggestions were taken into account. Thanks for
> everybody who tested and/or sent suggestions
> to my work.
>
> There are a few prerequisite patches which fixes
> some problems found during work on memory hotplug
> patch or add some futures which are needed by
> memory hotplug patch.
>
> Full list of fixes/futures:
> - mm: Add add_registered_memory() to memory hotplug API,
> - xen/balloon: Removal of driver_pages,
> - xen/balloon: HVM mode support,
> - xen/balloon: Migration from mod_timer() to schedule_delayed_work(),
> - xen/balloon: Protect against CPU exhaust by event/x process,
> - xen/balloon: Minor notation fixes,
> - xen/balloon: Memory hotplug support for Xen balloon driver.
>
> Additionally, I suggest to apply patch prepared by Steffano Stabellini
> (https://lkml.org/lkml/2011/1/31/232) which fixes memory management
> issue in Xen guest. I was not able boot guest machine without
> above mentioned patch.
>
> I have received notice that this series of patches broke
> machine migration under Xen. I am going to solve that problem ASAP.
> I do not have received any notices about other problems till now.
>
> Daniel
Thank You very much for work. I'm try this patch for migration issues
and send comments.
I have some may be offtopic question: Is that possible to export balloon
function balloon_set_new_target to GPL modules (EXPORT_SYMBOL_GPL) ?
This helps to kernel modules (not in kernel tree) to contol balloonin
(for example autoballoon or something else) without needing to write so
sysfs. (Writing files from kernel module is bad, this says Linux Kernel
Faq).
On Thu, 2011-02-03 at 21:20 +0000, Vasiliy G Tolstov wrote:
> I have some may be offtopic question: Is that possible to export balloon
> function balloon_set_new_target to GPL modules (EXPORT_SYMBOL_GPL) ?
> This helps to kernel modules (not in kernel tree) to contol balloonin
> (for example autoballoon or something else) without needing to write so
> sysfs. (Writing files from kernel module is bad, this says Linux Kernel
> Faq).
Is there a reason to do it from kernel space in the first place? auto
ballooning can be done by a userspace daemon, can't it?
Ian.
On Fri, 2011-02-04 at 09:11 +0000, Ian Campbell wrote:
> On Thu, 2011-02-03 at 21:20 +0000, Vasiliy G Tolstov wrote:
> > I have some may be offtopic question: Is that possible to export balloon
> > function balloon_set_new_target to GPL modules (EXPORT_SYMBOL_GPL) ?
> > This helps to kernel modules (not in kernel tree) to contol balloonin
> > (for example autoballoon or something else) without needing to write so
> > sysfs. (Writing files from kernel module is bad, this says Linux Kernel
> > Faq).
>
> Is there a reason to do it from kernel space in the first place? auto
> ballooning can be done by a userspace daemon, can't it?
>
> Ian.
>
Yes. It can be done via userspace, but if i want to control autoballon
via sysfs/sysctl/procfs i need to write module. And i don't think that
export this function can break some stuff. Now i have autoballoon kernel
module that enlarge and shrinks memory. Userspace daemon need some
dependencies like glibc, libxenstore and others, but if i'm not provide
ability to chouse kernel (i'm boot domU via kernel and ramdisk), very
simple to add in ramdisk kernel module that says disk/memory usage and
controls memory ballooning.
--
Vasiliy G Tolstov <[email protected]>
Selfip.Ru
> From: Ian Campbell [mailto:[email protected]]
> Sent: Friday, February 04, 2011 2:11 AM
>
> On Thu, 2011-02-03 at 21:20 +0000, Vasiliy G Tolstov wrote:
> > I have some may be offtopic question: Is that possible to export
> balloon
> > function balloon_set_new_target to GPL modules (EXPORT_SYMBOL_GPL) ?
> > This helps to kernel modules (not in kernel tree) to contol balloonin
> > (for example autoballoon or something else) without needing to write
> so
> > sysfs. (Writing files from kernel module is bad, this says Linux
> Kernel
> > Faq).
>
> Is there a reason to do it from kernel space in the first place? auto
> ballooning can be done by a userspace daemon, can't it?
The whole point of self-ballooning is to teach an OS kernel to
be more aggressive about "surrendering" memory that it isn't
using efficiently. I've called this "memory asceticism". See
slide 12 in
http://oss.oracle.com/projects/tmem/dist/documentation/presentations/MemMgmtVirtEnv-LPC2010-Final.pdf
as well as the issues/solutions slides later in that presentation.
And for anyone on this dist list seeing these slides and
concepts for the first time, you can "read" the presentation
with the speaker notes here:
http://oss.oracle.com/projects/tmem/dist/documentation/presentations/MemMgmtVirtEnv-LPC2010-SpkNotes.pdf