From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Bob Liu <bob.liu@oracle.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: 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: Wed, 06 Nov 2013 20:25:04 -0500 [thread overview]
Message-ID: <7ae8615f-36f4-4c28-a147-c522335ba8f7@email.android.com> (raw)
In-Reply-To: <527AE1CA.7030703@oracle.com>
Bob Liu <bob.liu@oracle.com> wrote:
>
>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()?
No. In PV that calculation is correct as it gets the amount of RAM pages - which is a exactly what you need.
>
>> balloon_stats.target_pages = balloon_stats.current_pages;
>> balloon_stats.balloon_low = 0;
>> balloon_stats.balloon_high = 0;
>>
next prev parent reply other threads:[~2013-11-07 1:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 20:37 Boris Ostrovsky
2013-11-06 21:29 ` Konrad Rzeszutek Wilk
2013-11-07 0:41 ` [Xen-devel] " Bob Liu
2013-11-07 1:25 ` Konrad Rzeszutek Wilk [this message]
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=7ae8615f-36f4-4c28-a147-c522335ba8f7@email.android.com \
--to=konrad.wilk@oracle.com \
--cc=bob.liu@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
all inboxes | Powered by JetHome®