• Juergen Gross's avatar
    xen/balloon: don't online new memory initially · 96edd61d
    Juergen Gross authored
    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: default avatarJuergen Gross <jgross@suse.com>
    Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
    Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
    96edd61d
balloon.c 18.9 KB