All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/balloon: Set balloon's initial state to number of existing RAM pages
@ 2013-11-06 20:37 Boris Ostrovsky
  2013-11-06 21:29 ` Konrad Rzeszutek Wilk
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Boris Ostrovsky @ 2013-11-06 20:37 UTC (permalink / raw)
  To: konrad.wilk, david.vrabel; +Cc: xen-devel, linux-kernel, boris.ostrovsky

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>
---
 drivers/xen/balloon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index b232908..1b62304 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;
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-11-07 17:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06 20:37 [PATCH] xen/balloon: Set balloon's initial state to number of existing RAM pages Boris Ostrovsky
2013-11-06 21:29 ` Konrad Rzeszutek Wilk
2013-11-06 21:29 ` Konrad Rzeszutek Wilk
2013-11-07  0:41 ` Bob Liu
2013-11-07  0:41 ` [Xen-devel] " Bob Liu
2013-11-07  1:25   ` Konrad Rzeszutek Wilk
2013-11-07  1:25   ` [Xen-devel] " Konrad Rzeszutek Wilk
2013-11-07 14:38     ` Daniel Kiper
2013-11-07 14:38       ` Daniel Kiper
2013-11-07 17:37       ` Konrad Rzeszutek Wilk
2013-11-07 17:37       ` [Xen-devel] " Konrad Rzeszutek Wilk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.