linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Matt Mackall <mpm@selenic.com>
Cc: Dave Hansen <dave@linux.vnet.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	hans.rosenfeld@amd.com, linux-mm@kvack.org, riel@redhat.com,
	nacc <nacc@linux.vnet.ibm.com>,
	Adam Litke <agl@linux.vnet.ibm.com>
Subject: Re: [v4][PATCH 2/2] fix large pages in pagemap
Date: Thu, 12 Jun 2008 22:36:48 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0806122216580.14873@blonde.site> (raw)
In-Reply-To: <1213223825.20045.138.camel@calx>

On Wed, 11 Jun 2008, Matt Mackall wrote:
> On Wed, 2008-06-11 at 14:23 -0700, Dave Hansen wrote:
> > On Wed, 2008-06-11 at 13:52 -0700, Andrew Morton wrote:
> > 
> > > Am I missing something, or is pmd_huge() a whopping big grenade for x86
> > > developers to toss at non-x86 architectures?  It seems quite dangerous.
> > 
> > Yeah, it isn't really usable outside of arch code, although it kinda
> > looks like it.
> 
> That begs the question: if we can't use it reliably outside of arch
> code, why do other arches even bother defining it?

Good question.

> And the answer seems to be because of the two uses in mm/memory.c. The
> first seems like it could be avoided with an implementation of
> follow_huge_addr on x86.

No, I don't think we need even that: because get_user_pages avoids
follow_page on huge vmas, and little else uses follow_page, I think
we could delete follow_huge_addr from all architectures.

It's gives a warm glow to know that follow_page could cope with
huge ranges if necessary, but it doesn't feel so good once you've
been misled by pmd_huge.

Incidentally, x86 turns out to have a pmd_large() too!

> The second is either bogus (only works on x86)
> or superfluous (not needed at all), no?

Not needed (checking for things that should never happen
is nice when it's convenient, but not a reason to uglify).

On Dave's patch: yes, I too would have preferred a pmd_huge-style
vma-less approach, but fear that doesn't work out at present.  But
isn't the patch calling find_vma() much more often than necessary?
Is there any architecture which can mix huge and normal pages
within the lowest pagetable?

Hugh

--
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:[~2008-06-12 21:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-11 18:02 [v4][PATCH 1/2] pass mm into pagewalkers Dave Hansen
2008-06-11 18:02 ` [v4][PATCH 2/2] fix large pages in pagemap Dave Hansen
2008-06-11 19:37   ` Andrew Morton
2008-06-11 19:53     ` Matt Mackall
2008-06-11 20:11       ` Andrew Morton
2008-06-11 20:21         ` Matt Mackall
2008-06-11 20:34         ` Dave Hansen
2008-06-11 20:52           ` Andrew Morton
2008-06-11 21:01             ` Rik van Riel
2008-06-11 21:23             ` Dave Hansen
2008-06-11 22:37               ` Matt Mackall
2008-06-12 21:36                 ` Hugh Dickins [this message]
2008-06-12 22:35                   ` Matt Mackall
2008-06-11 20:15       ` Dave Hansen
2008-06-11 19:35 ` [v4][PATCH 1/2] pass mm into pagewalkers Andrew Morton

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=Pine.LNX.4.64.0806122216580.14873@blonde.site \
    --to=hugh@veritas.com \
    --cc=agl@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=hans.rosenfeld@amd.com \
    --cc=linux-mm@kvack.org \
    --cc=mpm@selenic.com \
    --cc=nacc@linux.vnet.ibm.com \
    --cc=riel@redhat.com \
    /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