From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: Mark McLoughlin <markmc@redhat.com>,
xen-devel <xen-devel@lists.xensource.com>,
Andrea Arcangeli <andrea@qumranet.com>,
Eduardo Habkost <ehabkost@redhat.com>,
Michael Abd-El-Malek <mabdelmalek@cmu.edu>,
Christoph Lameter <clameter@sgi.com>
Subject: Re: Vanilla Linux and has_foreign_mapping
Date: Thu, 24 Apr 2008 17:18:13 -0700 [thread overview]
Message-ID: <48112345.5000503@goop.org> (raw)
In-Reply-To: <C4329BC3.16E37%keir.fraser@eu.citrix.com>
Keir Fraser wrote:
> I'm not really familiar with the pv_ops code I'm afraid. But thinking about
> this some more I've realised there's no way really to avoid making the
> early-unpin logic aware of gntdev mappings. This is because if we do pin pte
> pages, and require them to remain pinned across early-unpin, then
> pgd_unpin() must not attempt to make those pte pages writable. That will
> fail, because the pages are still pinned! You'd either need to handle the
> failure to make the page writable, or have a per-page flag to indicate which
> pte pages contain gntdev mappings. Frankly you may as well stick with the
> per-mm-context has_foreign_mappings flag.
>
So the issue is that a pte page containing a _PAGE_IO pte must remain
pinned while it contains that mapping? Would shooting down the mapping
allow it to be unpinned, or does that need to be deferred until some
later point (if so, when?)?
I guess the downside is that we'd need to scan the pte looking for
_PAGE_IO mappings, which is a bit of a pain. Skipping that would mean
hiding a flag somewhere...
> Is it a pain to add a pv_ops-subtype-specific flag to mm_context? If so you
> could maintain a set datastructure instead, indicating which mm_contexts
> contain foreign mappings.
>
So, in 2.6.18-xen mm->has_foreign_mapping makes it skip early-unpin, but
puts it off until pgd_free(). Presumably that works because all the
vma's all been unmapped by then...
I wonder if Christoph/Andrea's mmu notifier patch is useful here... Maybe?
Christoph/Andrea: would the mmu notifier mechanism allow us to
efficiently generate the set of ptes mapping granted pages (pages from
other domains), so we can shoot them down during process exit?
J
next prev parent reply other threads:[~2008-04-25 0:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-20 21:19 Vanilla Linux and has_foreign_mapping Michael Abd-El-Malek
2008-04-21 11:46 ` Jeremy Fitzhardinge
2008-04-21 16:36 ` Mark McLoughlin
2008-04-21 18:00 ` Michael Abd-El-Malek
2008-04-21 17:52 ` Keir Fraser
2008-04-21 18:10 ` Michael Abd-El-Malek
2008-04-21 18:17 ` Michael Abd-El-Malek
2008-04-21 18:30 ` Keir Fraser
2008-04-25 0:18 ` Jeremy Fitzhardinge [this message]
2008-04-25 6:01 ` Keir Fraser
2008-04-25 17:11 ` Michael Abd-El-Malek
2008-04-25 18:22 ` Jeremy Fitzhardinge
2008-04-25 18:31 ` Michael Abd-El-Malek
2008-04-25 22:33 ` Jeremy Fitzhardinge
2008-04-29 16:39 ` Michael Abd-El-Malek
2008-04-29 17:32 ` Jeremy Fitzhardinge
2008-04-30 16:31 ` Michael Abd-El-Malek
[not found] ` <20080425172416.GC23300@duo.random>
2008-04-26 0:14 ` Jeremy Fitzhardinge
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=48112345.5000503@goop.org \
--to=jeremy@goop.org \
--cc=andrea@qumranet.com \
--cc=clameter@sgi.com \
--cc=ehabkost@redhat.com \
--cc=keir.fraser@eu.citrix.com \
--cc=mabdelmalek@cmu.edu \
--cc=markmc@redhat.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.