From: Nick Piggin <npiggin@suse.de>
To: Andrea Arcangeli <andrea@qumranet.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
linux-arch@vger.kernel.org, steiner@sgi.com,
cl@linux-foundation.org
Subject: Re: MMU notifiers review and some proposals
Date: Sun, 27 Jul 2008 14:08:14 +0200 [thread overview]
Message-ID: <20080727120814.GA5223@wotan.suse.de> (raw)
In-Reply-To: <20080726131651.GB9598@duo.random>
On Sat, Jul 26, 2008 at 03:16:51PM +0200, Andrea Arcangeli wrote:
> On Sat, Jul 26, 2008 at 03:04:06PM +0200, Nick Piggin wrote:
> > On Sat, Jul 26, 2008 at 01:38:13PM +0200, Andrea Arcangeli wrote:
> > >
> > > 1) absolute minimal intrusion into the kernel common code, and
> > > absolute minimum number of branches added to the kernel fast
> > > paths. Kernel is faster than your "minimal" type of notifiers when
> > > they're disarmed.
> >
> > BTW. is this really significant? Having one branch per pte
> > I don't think is necessarily slower than 2 branches per unmap.
> >
> > The 2 branches will use more icache and more branch history. One
> > branch even once per pte in the unmapping loop is going to remain
> > hot in icache and branch history isn't it?
>
> Even if branch-predicted and icached, it's still more executable to
> compute in a tight loop. Even if quick it'll accumulate cycles. Said
True but having 2 branches and more icache is more likely to be a
branch mispredict or icache miss which costs a *lot* of cached,
predicted branches.
It's all speculation, but my point is that it is not accurate to
say my version woiuld be slower because in some cases it would be
the oposite.
> that perhaps you're right that my point 1 wasn't that important or not
> a tangible positive, but surely doing a secondary mmu invalidate for
> each pte zapped isn't ideal... that's the whole point of the
> tlb-gather logic, nobody wants to do that not even for the primary
> tlb, and surely not for the secondary-mmu that may not even be as fast
> as the primary-tlb at invalidating. Hence the very simple patch is
> clearly inferior when they're armed (if only equivalent when they're
> disarmed)...
See the thing about that is I don't actually dispute that in some
cases the range start/end case will definitely be faster. However,
firstly KVM as you say doesn't really care, and secondly we don't
have numbers for GRU (I'm talking about start/end vs gather)
> I think we can argue once you've reduced the frequency of the
> secondary mmu invalidates of a factor of 500 by mangling over the tlb
> gather logic per-arch.
OK, we'll see...
--
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>
next prev parent reply other threads:[~2008-07-27 12:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-24 14:39 Nick Piggin
2008-07-25 21:45 ` Andrea Arcangeli
2008-07-26 3:08 ` Nick Piggin
2008-07-26 11:38 ` Andrea Arcangeli
2008-07-26 12:28 ` Nick Piggin
2008-07-26 13:02 ` Andrea Arcangeli
2008-07-26 13:10 ` Nick Piggin
2008-07-26 13:35 ` Andrea Arcangeli
2008-07-27 12:25 ` Nick Piggin
2008-07-26 13:14 ` Nick Piggin
2008-07-26 13:49 ` Andrea Arcangeli
2008-07-27 12:32 ` Nick Piggin
2008-07-30 14:19 ` Christoph Lameter
2008-07-30 14:54 ` Andrea Arcangeli
2008-07-30 15:42 ` Christoph Lameter
2008-07-31 6:14 ` Nick Piggin
2008-07-31 14:19 ` Christoph Lameter
2008-07-26 12:33 ` Nick Piggin
2008-07-26 13:04 ` Nick Piggin
2008-07-26 13:16 ` Andrea Arcangeli
2008-07-27 12:08 ` Nick Piggin [this message]
2008-07-25 23:29 ` Jack Steiner
2008-07-26 3:18 ` Nick Piggin
2008-07-27 9:45 ` Andrew Morton
2008-07-27 12:38 ` 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=20080727120814.GA5223@wotan.suse.de \
--to=npiggin@suse.de \
--cc=akpm@linux-foundation.org \
--cc=andrea@qumranet.com \
--cc=cl@linux-foundation.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=steiner@sgi.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