xen/balloon: fix ballooned page accounting without hotplug enabled
authorJuergen Gross <jgross@suse.com>
Thu, 12 Dec 2019 14:17:50 +0000 (15:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Jan 2020 10:24:11 +0000 (11:24 +0100)
commit7d3e277cbaf1e76496a0db000136df451718ace2
treee58dbdd1f7293f2c12add062eeaec709715e9649
parente0e0a9558e8ae857fcae981cbbf8b5e7cea838c3
xen/balloon: fix ballooned page accounting without hotplug enabled

[ Upstream commit c673ec61ade89bf2f417960f986bc25671762efb ]

When CONFIG_XEN_BALLOON_MEMORY_HOTPLUG is not defined
reserve_additional_memory() will set balloon_stats.target_pages to a
wrong value in case there are still some ballooned pages allocated via
alloc_xenballooned_pages().

This will result in balloon_process() no longer be triggered when
ballooned pages are freed in batches.

Reported-by: Nicholas Tsirakis <niko.tsirakis@gmail.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/xen/balloon.c