From: Bob Liu <bob.liu@oracle.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: konrad.wilk@oracle.com, david.vrabel@citrix.com,
xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Subject: Re: [Xen-devel] [PATCH] xen/balloon: Set balloon's initial state to number of existing RAM pages
Date: Thu, 07 Nov 2013 08:41:46 +0800 [thread overview]
Message-ID: <527AE1CA.7030703@oracle.com> (raw)
In-Reply-To: <1383770260-15395-1-git-send-email-boris.ostrovsky@oracle.com>
On 11/07/2013 04:37 AM, 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.
>
This fix the strange behavior I mentioned yesterday, every time after
guest started balloon driver will be triggered unreasonably.
> 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();
By the way, should the other places using max_pfn also be changed with
get_num_physpages()?
> balloon_stats.target_pages = balloon_stats.current_pages;
> balloon_stats.balloon_low = 0;
> balloon_stats.balloon_high = 0;
>
--
Regards,
-Bob
next prev parent reply other threads:[~2013-11-07 0:42 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
2013-11-07 0:41 ` Bob Liu [this message]
2013-11-07 1:25 ` [Xen-devel] " 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=527AE1CA.7030703@oracle.com \
--to=bob.liu@oracle.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=konrad.wilk@oracle.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