summaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>2013-11-06 21:37:40 +0100
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2013-11-08 21:13:03 +0100
commitc275a57f5ec3056f732843b11659d892235faff7 (patch)
tree544c7a9caf0f55d5c1e3496df5bc129af4f63167 /drivers/xen
parentxen/mcfg: Call PHYSDEVOP_pci_mmcfg_reserved for MCFG areas. (diff)
downloadlinux-c275a57f5ec3056f732843b11659d892235faff7.tar.xz
linux-c275a57f5ec3056f732843b11659d892235faff7.zip
xen/balloon: Set balloon's initial state to number of existing RAM pages
Currently balloon's initial value is set to max_pfn which includes non-RAM ranges such as MMIO hole. As result, initial memory target (specified by guest's configuration file) will appear smaller than what balloon driver perceives to be the current number of available pages. Thus it will balloon down "extra" pages, decreasing amount of available memory for no good reason. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/balloon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index b232908a6192..1b6230419704 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -641,7 +641,7 @@ static int __init balloon_init(void)
balloon_stats.current_pages = xen_pv_domain()
? min(xen_start_info->nr_pages - xen_released_pages, max_pfn)
- : max_pfn;
+ : get_num_physpages();
balloon_stats.target_pages = balloon_stats.current_pages;
balloon_stats.balloon_low = 0;
balloon_stats.balloon_high = 0;