linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Nick Piggin <npiggin@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [patch 3/8] mm: merge nopfn into fault
Date: Wed, 23 May 2007 19:04:28 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.0.98.0705231857090.3890@woody.linux-foundation.org> (raw)
In-Reply-To: <20070524014223.GA22998@wotan.suse.de>


On Thu, 24 May 2007, Nick Piggin wrote:
> 
> At most, if Linus really doesn't want ->fault to do the nopfn thing, then
> I would be happy to leave in ->nopfn... but I don't see much reason not
> to just merge them anyway... one fewer branch and less code in the
> page fault handler.

I just think that the "->fault" calling convention is _broken_.

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)

 - return a nice return value saying that you aren't returning a page. And 
   since you *also* need to return a value saying whether the page you 
   want to install is locked or not, that just means that the "struct page 
   *" approach (with a few extra error cases) won't cut it.

 - don't add yet another interface. Replace it cleanly. If you don't want 
   to re-use the name, fine, but at least replace it with something 
   better. 

The old "nopage()" return values weren't exactly pretty before either, but 
dang, do we really have to make it even MORE broken by having to have 
_both_ the old and the new ones, with different interfaces and magic 
locking rules depending on flags? I say "no".

		Linus

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

  reply	other threads:[~2007-05-24  2:04 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 [this message]
2007-05-24  2:16         ` Nick Piggin
2007-05-24  3:17         ` Benjamin Herrenschmidt
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=alpine.LFD.0.98.0705231857090.3890@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@suse.de \
    /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