[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
  • Date: Fri, 13 Feb 2009 17:11:47 +0000
  • Cc:
  • Delivery-date: Fri, 13 Feb 2009 09:12:18 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcmN/PyMuwWlDwfjSUmyzXeFntwfFQAASpRu
  • Thread-topic: [Xen-devel] RE: transferring ownership of domheap pages

On 13/02/2009 17:02, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx> wrote:

>> A benefit of using steal_page() is
>> that we will maintain that for other callers
> 
> OK, I'll use steal_page(), though I think it is
> overkill as the pages I am dealing with are not
> addressable outside of the hypervisor, so there
> aren't any mappings being created and destroyed.

If you're sure of that then indeed you don't need steal_page(). But usually
you could not be sure of that if the page owner is non-NULL -- the whole
point of that is to allow the owner to make mappings as it likes. If you've
got extra mechanism to ensure your extra restrictions hold then you will
know better than me whether your previous patch is correct or not.

> I still need code for the other direction though:
> I have an anonymous page (on my own private "free"
> page_list) and I want it to be owned by a domain,
> but I don't want to free it and then alloc it
> (because I might not get the same page back).
> 
> Does the attached patch look good?  Are there
> any races that I am missing?  Is the name
> ("donate_page" opposite of "steal_page") OK?

Roughly. You do need to check d->is_dying so you don't race domain
destruction. Look at share_xen_page_with_guest() -- your function is sort of
a subset of that.

 -- Keir



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.