All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Cc: "Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>
Subject: Re: [hybrid] : mmap pfn space...
Date: Mon, 16 Apr 2012 17:26:10 +0100	[thread overview]
Message-ID: <1334593570.14560.230.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1204161715330.26786@kaball-desktop>

On Mon, 2012-04-16 at 17:22 +0100, Stefano Stabellini wrote:
> On Mon, 16 Apr 2012, Ian Campbell wrote:
> > > In a nutshell, I am still trying to figure how to allocate rsvd pfn's 
> > > for privcmd without writing a slab allocator.
> > 
> > Can't you just use the core get_page function (or
> > alloc_xenballooned_pages) and move the associated mfn aside temporarily
> > (or not if using alloc_xenballooned_pages)?
> 
> I think that is a good suggestion: if we are trying to get in something
> that works but might not be the best solution, then using
> alloc_xenballooned_pages to get some pages and then changing the p2m is
> the best option: it wastes a non-trivial amount of memory in dom0 but at
> least it is known to work well and it wouldn't be an "hack".

I don't think it wastes all that much -- even 10k pages is only a few
10s of megabytes for the duration of the build.

Also free_xenballooned_pages does the right thing if
alloc_xenballooned_pages had to explicitly free some pages to satisfy
the allocation. i.e. it will shrink the balloon and re-add those pages
to the allocator, it won't leave them in the balloon or something.

Ian.

> 
> Give a look at gntdev_alloc_map, gnttab_map_refs and m2p_add_override
> for an example.

  reply	other threads:[~2012-04-16 16:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23 18:01 [hybrid] : mmap pfn space Mukesh Rathor
2012-03-26 10:37 ` Stefano Stabellini
2012-03-26 10:40   ` Ian Campbell
2012-04-14  1:47   ` Mukesh Rathor
2012-04-16 14:14     ` Ian Campbell
2012-04-16 16:22       ` Stefano Stabellini
2012-04-16 16:26         ` Ian Campbell [this message]
2012-04-18  1:20         ` Mukesh Rathor
2012-04-18  8:33           ` Ian Campbell
2012-04-16 14:39     ` Daniel De Graaf
2012-04-16 14:59       ` Ian Campbell

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=1334593570.14560.230.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=Xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.