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

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

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] How to deallocate memory shared between domain and xen
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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