mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
xen/balloon: Support xend-based toolstack take two
commiteda4eabf86
upstream. Commit3aa6c19d2f
("xen/balloon: Support xend-based toolstack") tried to fix a regression with running on rather ancient Xen versions. Unfortunately the fix was based on the assumption that xend would just use another Xenstore node, but in reality only some downstream versions of xend are doing that. The upstream xend does not write that Xenstore node at all, so the problem must be fixed in another way. The easiest way to achieve that is to fall back to the behavior before commit96edd61dcf
("xen/balloon: don't online new memory initially") in case the static memory maximum can't be read. This is achieved by setting static_max to the current number of memory pages known by the system resulting in target_diff becoming zero. Fixes:3aa6c19d2f
("xen/balloon: Support xend-based toolstack") Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: <stable@vger.kernel.org> # 4.13 Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d85e2964a3
commit
9a69878dfa
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ static void watch_target(struct xenbus_watch *watch,
|
||||||
"%llu", &static_max) == 1))
|
"%llu", &static_max) == 1))
|
||||||
static_max >>= PAGE_SHIFT - 10;
|
static_max >>= PAGE_SHIFT - 10;
|
||||||
else
|
else
|
||||||
static_max = new_target;
|
static_max = balloon_stats.current_pages;
|
||||||
|
|
||||||
target_diff = (xen_pv_domain() || xen_initial_domain()) ? 0
|
target_diff = (xen_pv_domain() || xen_initial_domain()) ? 0
|
||||||
: static_max - balloon_stats.target_pages;
|
: static_max - balloon_stats.target_pages;
|
||||||
|
|
Loading…
Reference in a new issue