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

Re: [Xen-devel] How to deallocate memory shared between domain and xen




On 10 Aug 2005, at 02:53, Santos, Jose Renato G wrote:


  This seems to be working fine.
  Now, I am not sure what is the sequence of operations to deallocate
these
  shared pages when they are not needed anymore. I spent sometime
  looking at the code but I still don't have a clear understanding
  of how memory is managed in Xen.

  Any help is greatly appreciated, as will save me a lot of time ...

You want to be able to deallocate them before the domain you were sharing with is destroyed? There are no existing examples in Xen of how that would be done (things like grant-table pages and shared_info page are all destroyed after the domain dies).

Is this the kind of thing you are looking for?:
 1. On allocaction: SHARE_PFN_WITH_DOMAIN(); get_page();
 2. On deallocation: put_page()

...and then the pages get freed up automatically when the guest has freed all references. That is: the pages do not get freed until you have given up your one reference (put_page) and the guest has given up its references.

This can be added quite easily, but will require an new page flag.

 -- 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®.