diff options
author | Daniel Kiper <dkiper@net-space.pl> | 2011-07-25 20:12:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-25 23:57:08 -0400 |
commit | 080e2be7884322daffe75a831e879fbe7de383ab (patch) | |
tree | 4f0daffaa6a03ffee4bc730517584cefe9dbdc60 /include/xen | |
parent | 9d0ad8ca43ce8023bb834a409c2258bd7197fb05 (diff) |
xen/balloon: memory hotplug support for Xen balloon driver
Memory hotplug support for Xen balloon driver. It should be mentioned
that hotplugged memory is not onlined automatically. It should be onlined
by user through standard sysfs interface.
Memory could be hotplugged in following steps:
1) dom0: xl mem-max <domU> <maxmem>
where <maxmem> is >= requested memory size,
2) dom0: xl mem-set <domU> <memory>
where <memory> is requested memory size; alternatively memory
could be added by writing proper value to
/sys/devices/system/xen_memory/xen_memory0/target or
/sys/devices/system/xen_memory/xen_memory0/target_kb on dumU,
3) domU: for i in /sys/devices/system/memory/memory*/state; do \
[ "`cat "$i"`" = offline ] && echo online > "$i"; done
Memory could be onlined automatically on domU by adding following line to
udev rules:
SUBSYSTEM=="memory", ACTION=="add", RUN+="/bin/sh -c '[ -f /sys$devpath/state ] && echo online > /sys$devpath/state'"
In that case step 3 should be omitted.
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/xen')
-rw-r--r-- | include/xen/balloon.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/xen/balloon.h b/include/xen/balloon.h index 4076ed72afbd..76f7538bb339 100644 --- a/include/xen/balloon.h +++ b/include/xen/balloon.h | |||
@@ -15,6 +15,10 @@ struct balloon_stats { | |||
15 | unsigned long max_schedule_delay; | 15 | unsigned long max_schedule_delay; |
16 | unsigned long retry_count; | 16 | unsigned long retry_count; |
17 | unsigned long max_retry_count; | 17 | unsigned long max_retry_count; |
18 | #ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG | ||
19 | unsigned long hotplug_pages; | ||
20 | unsigned long balloon_hotplug; | ||
21 | #endif | ||
18 | }; | 22 | }; |
19 | 23 | ||
20 | extern struct balloon_stats balloon_stats; | 24 | extern struct balloon_stats balloon_stats; |