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

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


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Santos, Jose Renato G" <joserenato.santos@xxxxxx>
  • Date: Tue, 9 Aug 2005 18:53:24 -0700
  • Cc: Jose Renato Santos <jsantos@xxxxxxxxxx>
  • Delivery-date: Wed, 10 Aug 2005 01:51:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcWdTkrkd3pVH4AmSPC/7fzhvUGLsw==
  • Thread-topic: How to deallocate memory shared between domain and xen

  Hi,

  Can someone more experienced with memory management in Xen give me
  some advice?
  I am not sure how should I free memory shared between Xen and a
domain.
  This is part of my effort to port xenoprof to SMP guests.

  I used the code in trace.c as an example of how to allocate
  pages shared between Xen and a domain. This is how the
  shared pages are allocated:
  a) In Xen:
      - allocate pages from Xen heap using "alloc_xenheap_pages(order)"
      - share each page with domain using "SHARE_PFN_WITH_DOMAIN(page,
domain)"
  b) In kernel
      - reserve contiguous kernel virtual area using "get_vm_area(size,
VM_IOREMAP)"
      - Map shared pages into kernel virtual area using
"direct_remap_area_pages()"

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


  Thanks

  Renato


     

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