From: David Vrabel <david.vrabel@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: xen-devel@lists.xen.org, Ian Campbell <Ian.Campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: Balloon driver bug in increase_reservation
Date: Mon, 2 Sep 2013 16:07:11 +0100 [thread overview]
Message-ID: <5224A99F.1070300@citrix.com> (raw)
In-Reply-To: <20130902150432.GB14104@zion.uk.xensource.com>
On 02/09/13 16:04, Wei Liu wrote:
> On Mon, Sep 02, 2013 at 03:48:43PM +0100, Ian Campbell wrote:
>> On Mon, 2013-09-02 at 15:43 +0100, Wei Liu wrote:
>>> Hi, Stefano
>>>
>>> I found another bug in the balloon scratch page code. As I didn't follow
>>> the discussion on scratch page so I cannot propose a proper fix at the
>>> moment.
>>>
>>> The problem is that in balloon.c:increase_reservation, when a ballooned
>>> page is resued, it can have a valid P2M entry pointing to the scratch,
>>> hitting the BUG_ON
>>>
>>> BUG_ON(!xen_feature(XENFEAT_auto_translated_physmap) &&
>>> phys_to_machine_mapping_valid(pfn));
>>>
>>> As balloon worker might run by a CPU other then the one that returns the
>>> page, checking pfn_to_mfn(pfn) == local_cpu_scratch_page_mfn wouldn't
>>> work. Checking pfn_to_mfn(pfn) belongs to the set of all scratch page
>>> mfns is not desirable.
>>
>> This makes me think that whoever suggested that pfn_to_mfn for a
>> ballooned page out to return INVALID_MFN was right.
>>
>
> If there are many balloon pages the check can be expensive. If we make
> the scratch page globally shared by all CPUs the check can be less
> expensive? I don't understand why we need to have one page per CPU at
> first glance.
There needs to be a per-CPU mapping of the scratch pages as part of
doing the unmap_and_replace with the scratch page, its mapping is
cleared. It is later restored as a separate hypercall.
David
next prev parent reply other threads:[~2013-09-02 15:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-02 14:43 Balloon driver bug in increase_reservation Wei Liu
2013-09-02 14:48 ` Ian Campbell
2013-09-02 15:04 ` Wei Liu
2013-09-02 15:07 ` David Vrabel [this message]
2013-09-02 15:09 ` Ian Campbell
2013-09-02 15:13 ` Wei Liu
2013-09-02 15:31 ` Ian Campbell
2013-09-04 13:15 ` Stefano Stabellini
2013-09-04 13:20 ` Wei Liu
2013-09-04 13:31 ` Stefano Stabellini
2013-09-04 16:30 ` Wei Liu
2013-09-04 15:14 ` Konrad Rzeszutek Wilk
2013-09-04 15:42 ` Wei Liu
2013-09-04 16:35 ` Konrad Rzeszutek Wilk
2013-09-04 16:47 ` Wei Liu
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=5224A99F.1070300@citrix.com \
--to=david.vrabel@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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 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.