diff options
author | Juergen Gross <jgross@suse.com> | 2017-07-10 10:10:45 +0200 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2017-07-23 08:13:18 +0200 |
commit | 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 (patch) | |
tree | fe3ee0bcd1cef2d28ffd62a0c012ad972c581049 /drivers/xen/balloon.c | |
parent | xen/x86: fix cpu hotplug (diff) | |
download | linux-96edd61dcf44362d3ef0bed1a5361e0ac7886a63.tar.xz linux-96edd61dcf44362d3ef0bed1a5361e0ac7886a63.zip |
xen/balloon: don't online new memory initially
When setting up the Xenstore watch for the memory target size the new
watch will fire at once. Don't try to reach the configured target size
by onlining new memory in this case, as the current memory size will
be smaller in almost all cases due to e.g. BIOS reserved pages.
Onlining new memory will lead to more problems e.g. undesired conflicts
with NVMe devices meant to be operated as block devices.
Instead remember the difference between target size and current size
when the watch fires for the first time and apply it to any further
size changes, too.
In order to avoid races between balloon.c and xen-balloon.c init calls
do the xen-balloon.c initialization from balloon.c.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/xen/balloon.c')
-rw-r--r-- | drivers/xen/balloon.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 50dcb68d8070..ab609255a0f3 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -780,6 +780,9 @@ static int __init balloon_init(void) } #endif + /* Init the xen-balloon driver. */ + xen_balloon_init(); + return 0; } subsys_initcall(balloon_init); |