OSDN Git Service

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:22:40 +0000 (11:22 +0100)
commit91f060f5c5c8fe3b8d171e1d191512c400780352
treef4b13c366523bc531ce13ff52c9279755870c582
parent8af55939293b82595bdd8bde5a4717b1f57c8f7a
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