From: Nick Piggin <npiggin@suse.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Hugh Dickins <hugh@veritas.com>,
Jared Hulbert <jaredeh@gmail.com>,
Carsten Otte <cotte@de.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
linux-arch@vger.kernel.org
Subject: Re: [rfc][patch 2/2] mm: introduce optional pte_special pte bit
Date: Sun, 13 Jan 2008 05:39:22 +0100 [thread overview]
Message-ID: <20080113043922.GA22345@wotan.suse.de> (raw)
In-Reply-To: <alpine.LFD.1.00.0801121925330.2806@woody.linux-foundation.org>
On Sat, Jan 12, 2008 at 07:41:16PM -0800, Linus Torvalds wrote:
>
>
> On Sun, 13 Jan 2008, Nick Piggin wrote:
> >
> > mm: introduce pte_special pte bit
>
> What's the point of this?
Well, it's written in the changelog. I'm not asking for it to be merged
or anything just now because obviously it isn't in a patchset with anything
that needs it, just want some comments on the idea.
Myself, I would like such a bit to implement lockless get_user_pages on
x86. The x390 guys want to implement pfn mapped xip with the same bit in
their pagetables.
> > 23 files changed, 147 insertions(+), 37 deletions(-)
>
> That's lots of new (ugly) code, and two totally different paths, that
> aren't even cleanly abstracted, so now there's two separate things that
> are just arbitrarily selected by an #ifdef.
How should it be cleanly abstracted?
> You seem to claim that this is a performance issue, with vm_normal_page()
Hmm, the performance observation was an aside. I'd love to be able to
fix up the existing vm_normal_page as well. Sorry if that wasn't clear.
> eating up to 5% of time on some loads, but it would appear that the main
> thing you did that will speed up vm_normal_page() is the fact that you
> replaced the current
>
> if (unlikely(!pfn_valid(pfn))) {
> print_bad_pte(vma, pte, addr);
> return NULL;
> }
FWIW I have wanted to put this under DEBUG_VM too, but there were
objections.
> Does the code generation really change that radically that this makes any
> real difference?
It's mainly for semantics. Basically: if we have architectures with such
a bit in their ptes anyway for other reasons, I'm hoping we can use it in
vm_normal_page too, because it's just a nicer. (and it is fundamentally
faster for MIXEDMAP mappings, but that's probably not a big issue at this
point)
next prev parent reply other threads:[~2008-01-13 4:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-13 3:08 [rfc] changes to user memory mapping scheme Nick Piggin
2008-01-13 3:09 ` [rfc][patch 1/2] mm: introduce VM_MIXEDMAP Nick Piggin
2008-01-13 3:10 ` [rfc][patch 2/2] mm: introduce optional pte_special pte bit Nick Piggin
2008-01-13 3:41 ` Linus Torvalds
2008-01-13 4:39 ` Nick Piggin [this message]
2008-01-13 4:45 ` Linus Torvalds
2008-01-13 5:06 ` Nick Piggin
2008-01-13 16:50 ` Linus Torvalds
2008-01-13 20:46 ` Martin Schwidefsky
2008-01-14 21:04 ` Jared Hulbert
2008-01-15 9:18 ` Carsten Otte
2008-01-16 3:38 ` Nick Piggin
2008-01-16 4:04 ` Linus Torvalds
2008-01-16 4:37 ` Nick Piggin
2008-01-16 4:48 ` Linus Torvalds
2008-01-16 4:51 ` David Miller
2008-01-16 5:23 ` Linus Torvalds
2008-01-16 5:48 ` Nick Piggin
2008-01-16 9:52 ` Martin Schwidefsky
2008-01-16 5:17 ` Nick Piggin
2008-01-16 10:52 ` Catalin Marinas
2008-01-16 18:18 ` Russell King
2008-01-16 17:21 ` Linus Torvalds
2008-01-16 17:14 ` David Howells
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=20080113043922.GA22345@wotan.suse.de \
--to=npiggin@suse.de \
--cc=cotte@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=hugh@veritas.com \
--cc=jaredeh@gmail.com \
--cc=linux-arch@vger.kernel.org \
--cc=schwidefsky@de.ibm.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;
as well as URLs for NNTP newsgroup(s).