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

Re: [Xen-devel] How to allocate a memory page in virtual memory, but does not use physical memory?


  • To: Lily Huang <ushuanglily@xxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
  • Date: Fri, 11 Aug 2006 10:27:03 +0100
  • Delivery-date: Fri, 11 Aug 2006 02:27:37 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Aca9KE3njGxepSkbEdu4bwAKle7CWA==
  • Thread-topic: [Xen-devel] How to allocate a memory page in virtual memory, but does not use physical memory?




On 11/8/06 2:27 am, "Lily Huang" <ushuanglily@xxxxxxxxx> wrote:

I am trying to allocate pages in a domU and map certain pages from Dom0. Since the pages are already in dom0's physical memory, it is desired that domu only allocate a "virtual space" for remapping, but does not need to use physical memory allocated to domu. I tried function balloon_alloc_empty_page_range() and alloc_pages(). But both of them seem to use physical memory once allocation succeed.


Balloon_empty_alloc_page_range() does what you want. It frees up the RAM which was previously mapped in the virtual address range that it returns to the caller.

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