mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
xen/balloon: fix ballooned page accounting without hotplug enabled
[ Upstream commit c673ec61ad
]
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>
This commit is contained in:
parent
ec177a46e9
commit
33fa919df6
1 changed files with 2 additions and 1 deletions
|
@ -395,7 +395,8 @@ static struct notifier_block xen_memory_nb = {
|
|||
#else
|
||||
static enum bp_state reserve_additional_memory(void)
|
||||
{
|
||||
balloon_stats.target_pages = balloon_stats.current_pages;
|
||||
balloon_stats.target_pages = balloon_stats.current_pages +
|
||||
balloon_stats.target_unpopulated;
|
||||
return BP_ECANCELED;
|
||||
}
|
||||
#endif /* CONFIG_XEN_BALLOON_MEMORY_HOTPLUG */
|
||||
|
|
Loading…
Reference in a new issue