diff options
Diffstat (limited to 'drivers/xen/Kconfig')
-rw-r--r-- | drivers/xen/Kconfig | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig index 73708acce3ca..979a8317204f 100644 --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig | |||
@@ -37,23 +37,30 @@ config XEN_BALLOON_MEMORY_HOTPLUG | |||
37 | 37 | ||
38 | Memory could be hotplugged in following steps: | 38 | Memory could be hotplugged in following steps: |
39 | 39 | ||
40 | 1) dom0: xl mem-max <domU> <maxmem> | 40 | 1) target domain: ensure that memory auto online policy is in |
41 | effect by checking /sys/devices/system/memory/auto_online_blocks | ||
42 | file (should be 'online'). | ||
43 | |||
44 | 2) control domain: xl mem-max <target-domain> <maxmem> | ||
41 | where <maxmem> is >= requested memory size, | 45 | where <maxmem> is >= requested memory size, |
42 | 46 | ||
43 | 2) dom0: xl mem-set <domU> <memory> | 47 | 3) control domain: xl mem-set <target-domain> <memory> |
44 | where <memory> is requested memory size; alternatively memory | 48 | where <memory> is requested memory size; alternatively memory |
45 | could be added by writing proper value to | 49 | could be added by writing proper value to |
46 | /sys/devices/system/xen_memory/xen_memory0/target or | 50 | /sys/devices/system/xen_memory/xen_memory0/target or |
47 | /sys/devices/system/xen_memory/xen_memory0/target_kb on dumU, | 51 | /sys/devices/system/xen_memory/xen_memory0/target_kb on the |
52 | target domain. | ||
48 | 53 | ||
49 | 3) domU: for i in /sys/devices/system/memory/memory*/state; do \ | 54 | Alternatively, if memory auto onlining was not requested at step 1 |
50 | [ "`cat "$i"`" = offline ] && echo online > "$i"; done | 55 | the newly added memory can be manually onlined in the target domain |
56 | by doing the following: | ||
51 | 57 | ||
52 | Memory could be onlined automatically on domU by adding following line to udev rules: | 58 | for i in /sys/devices/system/memory/memory*/state; do \ |
59 | [ "`cat "$i"`" = offline ] && echo online > "$i"; done | ||
53 | 60 | ||
54 | SUBSYSTEM=="memory", ACTION=="add", RUN+="/bin/sh -c '[ -f /sys$devpath/state ] && echo online > /sys$devpath/state'" | 61 | or by adding the following line to udev rules: |
55 | 62 | ||
56 | In that case step 3 should be omitted. | 63 | SUBSYSTEM=="memory", ACTION=="add", RUN+="/bin/sh -c '[ -f /sys$devpath/state ] && echo online > /sys$devpath/state'" |
57 | 64 | ||
58 | config XEN_BALLOON_MEMORY_HOTPLUG_LIMIT | 65 | config XEN_BALLOON_MEMORY_HOTPLUG_LIMIT |
59 | int "Hotplugged memory limit (in GiB) for a PV guest" | 66 | int "Hotplugged memory limit (in GiB) for a PV guest" |