[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFyVxOw0upa=At6MmiNYEHzfPz4rE5bZUBCs9h4vKGh1iA@mail.gmail.com>
Date: Wed, 17 Dec 2014 08:28:23 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Will Deacon <will.deacon@....com>
Cc: Dave Hansen <dave@...1.net>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Peter Zijlstra <peterz@...radead.org>,
Russell King - ARM Linux <linux@....linux.org.uk>,
Michal Simek <monstr@...str.eu>,
LKML <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>
Subject: Re: post-3.18 performance regression in TLB flushing code
On Wed, Dec 17, 2014 at 2:08 AM, Will Deacon <will.deacon@....com> wrote:
>
> I think there are a couple of things you could try to see if that 2% comes
> back:
>
> * Revert the patch and try the one here [1] instead (which only does part
> (1) of the above).
>
> -- or --
>
> * Instead of adding the tlb->end check to tlb_flush_mmu, add it to
> tlb_flush_mmu_free
or just move the check back to tlb_flush_mmu() where it belongs.
I don't see why you moved it to "tlb_flush_mmu_tlbonly()" in the first
place, or why you'd now want to add it to tlb_flush_mmu_free().
Both of those helper functions have two callers:
- tlb_flush_mmu(). Doing it here (instead of in the helper functions)
is the right thing to do
- the "force_flush" case: we know we have added at least one page to
the TLB state so checking for it is pointless.
So I'm not seeing why you wanted to do it in tlb_flush_mmu_tlbonly(),
and now add it to tlb_flush_mmu_free(). That seems bogus.
So why not just this trivial patch, to make the logic be the same it
used to be (just using "end > 0" instead of the old "need_flush")?
Linus
View attachment "patch.diff" of type "text/plain" (714 bytes)
Powered by blists - more mailing lists