public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: david.vrabel@citrix.com, xen-devel@lists.xenproject.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xen/balloon: Set balloon's initial state to number of existing RAM pages
Date: Wed, 6 Nov 2013 16:29:19 -0500	[thread overview]
Message-ID: <20131106212919.GB23133@phenom.dumpdata.com> (raw)
In-Reply-To: <1383770260-15395-1-git-send-email-boris.ostrovsky@oracle.com>

On Wed, Nov 06, 2013 at 03:37:40PM -0500, Boris Ostrovsky wrote:
> 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.

Duh!

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

> 
> 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
> 

  reply	other threads:[~2013-11-06 21:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2013-11-07  0:41 ` [Xen-devel] " Bob Liu
2013-11-07  1:25   ` Konrad Rzeszutek Wilk
2013-11-07 14:38     ` Daniel Kiper
2013-11-07 17:37       ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131106212919.GB23133@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox