linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	akpm@linux-foundation.org, linux-mm@kvack.org,
	randy.dunlap@oracle.com
Subject: Re: [patch 2/8] mm: merge populate and nopage into fault (fixes nonlinear)
Date: Thu, 24 May 2007 03:48:03 +0200	[thread overview]
Message-ID: <20070524014803.GB22998@wotan.suse.de> (raw)
In-Reply-To: <1179963439.32247.987.camel@localhost.localdomain>

On Thu, May 24, 2007 at 09:37:19AM +1000, Benjamin Herrenschmidt wrote:
> On Fri, 2007-05-18 at 08:11 -0700, Linus Torvalds wrote:
> 
> > Also, the commentary says that you're planning on replacing "nopfn" too, 
> > which means that returning a "struct page *" is wrong. So the patch is
> > introducing a new interface that is already known to be broken. 
> 
> Agreed.

Yep, I will change it to return the fault type. This makes page_mkwrite
merge cleaner too.


> >  - "struct fault_data" is a stupid name. Of *course* it is data: it's a 
> >    struct. It can't be code. But it's not even about faults. It's about 
> >    missing pages.
> > 
> >    So call it something else. Maybe just "struct nopage". Or, "struct 
> >    vm_fault" at least, so that it's at least not about *random* faults.
> > 
> >  - drop "address" from "struct fault_data". Even if some user were to have 
> >    some reason to use it (doubtful), it should be called somethign long 
> >    and cumbersome, so that you don't use it by mistake, not realizing that 
> >    you should use the page index instead.
> 
> I'd rather have it in, even if it's long and cumbersome :-) As I said,
> there are a few HW drivers around the tree like spufs or some weirdo IBM
> infiniband stuff that do really tricky games with nopage/nopfn and which
> can have good use of it (at the very least, it's useful for debugging to
> printk where the accesses that ended up doing the wrong thing precisely
> was done :-)
> 
> >  - and keep calling it "nopage". 
> 
> Fine by me.

I won't do this. I'll keep calling it fault, because a) it means we keep
the backwards compatible ->nopage path until all drivers are converted,
and b) the page_mkwrite conversion really will make "nopage" the wrong
name.

I don't mind about the struct naming, but struct fault or struct nopage
seems weird to me... but whatever. Maybe we can change it to struct
fault_struct to go along with struct task_struct and struct mm_struct? ;)

--
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  1:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-18  7:37 akpm, Nick Piggin
2007-05-18 10:24 ` Christoph Hellwig
2007-05-18 15:11 ` Linus Torvalds
2007-05-19  1:38   ` Nick Piggin
2007-05-22 15:12   ` Christoph Hellwig
2007-05-23  1:14     ` Linus Torvalds
2007-05-23  8:35       ` David Chinner
2007-05-23  9:35         ` Nick Piggin
2007-05-23  2:57     ` Nick Piggin
2007-05-23 23:37   ` Benjamin Herrenschmidt
2007-05-24  1:48     ` Nick Piggin [this message]
2007-05-24  2:06       ` Linus Torvalds
2007-05-24  2:24         ` 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=20070524014803.GB22998@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-mm@kvack.org \
    --cc=randy.dunlap@oracle.com \
    --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