WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] RE: transferring ownership of domheap pages

To: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] RE: transferring ownership of domheap pages
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 13 Feb 2009 15:23:01 +0000
Cc:
Delivery-date: Fri, 13 Feb 2009 07:23:34 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <7a5163fb-cbb9-44b4-a6e8-76c63be97a5b@default>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmN7fYgl+sJmTXiQ3OE+JjPO0ZT7QAAP7zV
Thread-topic: [Xen-devel] RE: transferring ownership of domheap pages
User-agent: Microsoft-Entourage/12.15.0.081119
On 13/02/2009 15:14, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx> wrote:

>> Yeah, that's pretty... optimistic. ;-)
> 
> What else do you see that is missing in my first cut?
> Do you see any other code there that's just wrong?

You can't just assert that count_info == PGC_allocated|1, for example. You
need to be careful that mappings aren't created or destroyed while you are
changing the ownership. Steal_page() does that. Once a page is anonymous,
transferring it to a domain is easier, since mappings can't be
created/destroyed while it is anonymous. So steal_page() just does the hard
transition for you (non-anon -> anon). A benefit of using steal_page() is
that we will maintain that for other callers -- a private implementation in
tmem risks getting subtly unsafely broken every now and then.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel