public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Frank Mehnert <Frank.Mehnert@Sun.COM>
Cc: linux-kernel@vger.kernel.org, Avi Kivity <avi@redhat.com>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: PFs on pages pinned with get_user_pages()
Date: Fri, 30 Jan 2009 11:45:21 +0100	[thread overview]
Message-ID: <1233312321.4495.169.camel@laptop> (raw)
In-Reply-To: <200901301134.07242.frank.mehnert@sun.com>

On Fri, 2009-01-30 at 11:34 +0100, Frank Mehnert wrote:

> > Thing is, lock_page() and down_read() require to be able to schedule(),
> > so there's no way around that.
> >
> > So even if there was another way to disable scheduling, you'd still have
> > the same problem.
> 
> Yes, makes sense.
> 
> Back to my initial question: The problem arises for us because we depend
> on permanent mappings of memory which were
> 
>  - allocated with alloc_pages() or alloc_page()
>  - mapped into ring 3 with remap_pfn_range() and
>  - pinned with get_user_pages()
> 
> There are potential pagefaults when touching into these ring-3-mappings
> from ring 0. So I assume we could prevent such pagefaults if we access
> that memory from ring-0-mappings, right? Unfortunately, the space for
> ring-0-mappings (< 1GB) is smaller than userland (~ 3GB), at least on
> 32-bit systems.

if you only need to access one or two pages, you could kmap_atomic() the
actual pages from ring-0.


  reply	other threads:[~2009-01-30 10:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-29  8:05 PFs on pages pinned with get_user_pages() Frank Mehnert
2009-01-29 12:28 ` Peter Zijlstra
2009-01-29 13:08   ` Frank Mehnert
2009-01-29 13:43     ` Peter Zijlstra
2009-01-29 14:02       ` Frank Mehnert
2009-01-29 14:20         ` Peter Zijlstra
2009-01-29 14:41           ` Frank Mehnert
2009-01-29 14:52             ` Peter Zijlstra
2009-01-29 16:03               ` Frank Mehnert
2009-01-29 16:11                 ` Peter Zijlstra
2009-01-30 10:34                   ` Frank Mehnert
2009-01-30 10:45                     ` Peter Zijlstra [this message]
2009-01-29 14:56             ` [PATCH] x86: add might_sleep() to do_page_fault() Peter Zijlstra
2009-01-29 14:59               ` Ingo Molnar
2009-01-29 15:02                 ` [PATCH v2] " Peter Zijlstra
2009-01-29 15:03                   ` Ingo Molnar

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=1233312321.4495.169.camel@laptop \
    --to=peterz@infradead.org \
    --cc=Frank.Mehnert@Sun.COM \
    --cc=avi@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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