linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nick Piggin <npiggin@suse.de>,
	akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [patch 3/8] mm: merge nopfn into fault
Date: Thu, 24 May 2007 13:17:39 +1000	[thread overview]
Message-ID: <1179976659.32247.1026.camel@localhost.localdomain> (raw)
In-Reply-To: <alpine.LFD.0.98.0705231857090.3890@woody.linux-foundation.org>

On Wed, 2007-05-23 at 19:04 -0700, Linus Torvalds wrote:
> 
> If you want to install the PFN in the low-level driver, just
> 
>  - pass the whole "struct vm_fault" to the PFN-installing thing (so that 
>    the driver at least doesn't have to muck with the address)

Fair but in the case of spufs, I -do- have to much with the address in
the driver/fs since it's the driver that knows it wants to use 64K page
mappings, and thus need to insert the PTE with the special 64K flag in
the first of the 16 entries of that 64K region -and- align the address
down before passing it to vm_insert_pfn().

There no knowledge of that arch magic in the generic vm_insert_pfn() and
I don't think there should be. It's all understanding between the arch
specific spufs driver and the arch low level page table management.

I know I'm sort of a special case here though, but I think it might make
sense to have in the future the DRM do similar special things to use
larger HW page sizes to map things like framebuffers or large in-VRAM or
in-AGP objects, possibly using an arch helper that does that appropriate
address & pgprot flag munging, but in the end, the actual PTE insertion
is still the generic one and that should work just fine.

Anyway, I don't see any big hurry to change ->nopfn() and it's
associated NOPFN_REFAULT special return code and vm_insert_pfn() helper
from what they are right now. They work for the few special case that
need them just fine and can be kept separate from whatever other work
Nick is doing.

Cheers,
Ben.


--
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>

  parent reply	other threads:[~2007-05-24  3:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-18  7:37 akpm, Nick Piggin
2007-05-18 15:23 ` Linus Torvalds
2007-05-19  1:46   ` Nick Piggin
2007-05-23 23:40   ` Benjamin Herrenschmidt
2007-05-24  1:42     ` Nick Piggin
2007-05-24  2:04       ` Linus Torvalds
2007-05-24  2:16         ` Nick Piggin
2007-05-24  3:17         ` Benjamin Herrenschmidt [this message]
2007-05-24  3:26           ` Benjamin Herrenschmidt
2007-05-24  3:37             ` Linus Torvalds
2007-05-24  3:45               ` Nick Piggin
2007-05-24 10:07                 ` Christoph Hellwig
2007-05-24 10:15                   ` Benjamin Herrenschmidt
2007-05-24  3:48               ` Benjamin Herrenschmidt
2007-05-25 11:18               ` Nick Piggin
2007-05-25 16:36                 ` Linus Torvalds
2007-05-26  7:34                   ` Nick Piggin
2007-05-26  8:03                     ` Nick Piggin
2007-05-26 15:44                       ` Linus Torvalds

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=1179976659.32247.1026.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@suse.de \
    --cc=torvalds@linux-foundation.org \
    /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