xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: Ian Campbell <Ian.Campbell@citrix.com>,
	Xinxin Jin <xinxinjin89@gmail.com>
Cc: Xen-devel@lists.xen.org
Subject: Re: Difference between alloc_domheap_pages vs. alloc_xenheap_pages?
Date: Thu, 27 Jun 2013 09:19:58 +0100	[thread overview]
Message-ID: <CDF1B43E.2B045%keir.xen@gmail.com> (raw)
In-Reply-To: <1372320702.28443.8.camel@zakaz.uk.xensource.com>

On 27/06/2013 09:11, "Ian Campbell" <Ian.Campbell@citrix.com> wrote:

> On Wed, 2013-06-26 at 15:41 -0700, Xinxin Jin wrote:
> 
> 
>> I noticed the only difference between the two is to add PGC_xen_heap
>> flag in allocated xenheap pages. So does it matter to exchange these
>> two functions when allocating a heap page?
> 
> xenheap pages are always mapped, domheap pages are only mapped on demand
> with (un)map_domain_page. The big clue is that alloc_xenheap_pages
> returns a void* while alloc_domheap_pages returns a struct page_info*.
> 
> On some architectures with a large virtual address space (i.e. 64-bit
> ones) the two can be combined and the distinction becomes a bit moot,
> but it remains for the benefit of common code and also because even on
> 64-bit architectures when you have large amounts of RAM you may still
> end up with RAM which is not permanently mapped -- e.g. on x86_64 if you
> have >5TB of RAM then you end up with a split again.

Also xenheap-allocated pages must be explicitly freed by Xen, usually during
domain destruction.

> Ian.
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

      reply	other threads:[~2013-06-27  8:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-26 22:41 Difference between alloc_domheap_pages vs. alloc_xenheap_pages? Xinxin Jin
2013-06-27  8:11 ` Ian Campbell
2013-06-27  8:19   ` Keir Fraser [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CDF1B43E.2B045%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Xen-devel@lists.xen.org \
    --cc=xinxinjin89@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).