|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] Vanilla Linux and has_foreign_mapping
On 21/4/08 19:17, "Michael Abd-El-Malek" <mabdelmalek@xxxxxxx> wrote:
>> Yeah I'm in a similar situation as gntdev and blktap.
>>
>> So on 2.6.25, which doesn't have has_foreign_mappings, you're suggesting
>> that I pin the pte pages that contain grant mappings. How do I
>> accomplish that? And on process exit, do I have to take any extra steps
>> to unpin the pte page, or will those pages be freed regardless of their
>> "pin status"?
>
> OK I took a quick look at the code. On 2.6.25, xen_exit_mmap calls
> xen_pgd_unpin. xen_pgd_unpin walks over a pgd and calls unpin_page on any
> pinned pages. So it seems the current pgd_unpin code will not let us have any
> pte pages unpinned?
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.
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.
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] Vanilla Linux and has_foreign_mapping, Michael Abd-El-Malek
- [Xen-devel] Re: Vanilla Linux and has_foreign_mapping, Jeremy Fitzhardinge
- Re: [Xen-devel] Vanilla Linux and has_foreign_mapping, Keir Fraser
- Re: [Xen-devel] Vanilla Linux and has_foreign_mapping, Michael Abd-El-Malek
- Re: [Xen-devel] Vanilla Linux and has_foreign_mapping, Michael Abd-El-Malek
- Re: [Xen-devel] Vanilla Linux and has_foreign_mapping,
Keir Fraser <=
- Re: [Xen-devel] Vanilla Linux and has_foreign_mapping, Jeremy Fitzhardinge
- Re: [Xen-devel] Vanilla Linux and has_foreign_mapping, Keir Fraser
- Re: [Xen-devel] Vanilla Linux and has_foreign_mapping, Michael Abd-El-Malek
- Re: [Xen-devel] Vanilla Linux and has_foreign_mapping, Jeremy Fitzhardinge
- Re: [Xen-devel] Vanilla Linux and has_foreign_mapping, Michael Abd-El-Malek
- Re: [Xen-devel] Vanilla Linux and has_foreign_mapping, Jeremy Fitzhardinge
- Re: [Xen-devel] Vanilla Linux and has_foreign_mapping, Michael Abd-El-Malek
- Re: [Xen-devel] Vanilla Linux and has_foreign_mapping, Jeremy Fitzhardinge
- Message not available
- Re: [Xen-devel] Vanilla Linux and has_foreign_mapping, Jeremy Fitzhardinge
|
|
|
|
|