This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Re: Memory sharing, is it possible a page is freed in DomU o

To: MaoXiaoyun <tinnycloud@xxxxxxxxxxx>
Subject: [Xen-devel] Re: Memory sharing, is it possible a page is freed in DomU on its way to be shared?
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Wed, 20 Apr 2011 10:25:57 +0100
Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, xen devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "juihaochiang@xxxxxxxxx" <juihaochiang@xxxxxxxxx>
Delivery-date: Wed, 20 Apr 2011 02:26:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <BLU157-w329C4D6B99C392117F806CDA900@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <BLU157-w329C4D6B99C392117F806CDA900@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
At 14:26 +0100 on 19 Apr (1303223214), MaoXiaoyun wrote:
>    Hi:
>          Just come up this question.
>          Say a process in domU read IO, then blkfront driver will have a
>    new page prepared to
>    fill the IO data. The blkfront pass the gref to blkback in dom0, later
>    passed  to blktap, then
>    forward to  tapdisk for physical IO read, in memory sharing, the
>    gref may be nominate to
>    Xen for page sharing again( say this is sharing step).
>          My question is, it is possible during the IO data comes back from
>    tapdisk, the page
>    referred by gerf in domU could be freed? (maybe by process termination,
>    or blkfront free this page)
>         And if it is possible, then the page is free in domU, it is also
>    possible that the page be given
>    back to Xen through ballloon driver, and the P2M will be invaild.  This
>    may make *sharing step*
>    gfn points to a invalid mfn possible.
>         So is this possible happen?

It shouldn't be.  The reference counting of pages means that if the mem
sharing code has taken a reference to the page it can't be freed until
it gives it up again.   Do you think you've seen this happening?


Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

Xen-devel mailing list