From: "Thomas Hellström" <thomas@tungstengraphics.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: linux-mm@kvack.org
Subject: Re: Driver-driven paging?
Date: Tue, 10 Oct 2006 08:04:00 +0200 [thread overview]
Message-ID: <452B37D0.8000308@tungstengraphics.com> (raw)
In-Reply-To: <452AEDAB.5080109@yahoo.com.au>
Nick Piggin wrote:
> Thomas Hellstrom wrote:
>
>> Nick Piggin wrote:
>
>
>>> If you need for the driver to *then* export these pages out to be
>>> mapped
>>> by other processes in userspace, I think you run into problems if
>>> trying
>>> to use nopage. You'll need to go the nopfn route (and thus your
>>> mappings
>>> must disallow PROT_WRITE && MAP_PRIVATE).
>>>
>>> But I think that might just work?
>>>
>> Yes, possibly. What kind of problems would I expect if using nopage?
>> Is it, in particular, legal for a process to call get_user_pages()
>> with the tsk and mm arguments of another process?
>
>
> Oh that is legal. What I'm thinking you'd have problems with is one
> process having its pages imported to the kernel via get_user_pages,
> then exported again via an mmap()able device node.
>
> If another process mmaps these pages, you could easily get various
> problems like PageAnon being set for a file backed page, or rmap
> structures set up incorrectly for the page. It has been a while
> since I tried to look at the details, but I would just steer clear
> of that case.
>
> Using a nopfn handler (instead of nopage) means that the kernel will
> not look at the backing pages at all.
>
Thanks. I see what you mean.
Taking into account that we may need special pages on some architectures
to flip them into the AGP aperture, I might have to do a content copy
anyway...
/Thomas
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2006-10-10 6:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-09 15:21 Thomas Hellstrom
2006-10-09 16:37 ` Nick Piggin
2006-10-09 17:45 ` Thomas Hellström
2006-10-10 0:47 ` Nick Piggin
2006-10-10 6:04 ` Thomas Hellström [this message]
2006-10-12 18:24 ` Rik van Riel
2006-10-13 6:29 ` Nick Piggin
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=452B37D0.8000308@tungstengraphics.com \
--to=thomas@tungstengraphics.com \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
/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