]> git.baikalelectronics.ru Git - kernel.git/commit
xen/balloon: don't online new memory initially
authorJuergen Gross <jgross@suse.com>
Mon, 10 Jul 2017 08:10:45 +0000 (10:10 +0200)
committerJuergen Gross <jgross@suse.com>
Sun, 23 Jul 2017 06:13:18 +0000 (08:13 +0200)
commit6146963d035e1ef984d84a958db79ca7113c83c0
treefe3ee0bcd1cef2d28ffd62a0c012ad972c581049
parent6ef579da4afc2002edc60a2eb18d6966308bce3f
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>
drivers/xen/balloon.c
drivers/xen/xen-balloon.c
include/xen/balloon.h