]> git.baikalelectronics.ru Git - kernel.git/commit
mmu_gather: fix over-eager tlb_flush_mmu_free() calling
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Dec 2014 19:59:04 +0000 (11:59 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Dec 2014 19:59:04 +0000 (11:59 -0800)
commit920a53e20546ab477129c953a2327ef96d83f38a
tree285dc114754f7a6acd5dde5eac5a628bdd14598e
parent652b0c28228a0bedc77b59bae632157253b2aa1a
mmu_gather: fix over-eager tlb_flush_mmu_free() calling

Dave Hansen reports that commit 3b57951307b2 ("mmu_gather: move minimal
range calculations into generic code") caused a performance problem:

  "tlb_finish_mmu() goes up about 9x in the profiles (~0.4%->3.6%) and
   tlb_flush_mmu_free() takes about 3.1% of CPU time with the patch
   applied, but does not show up at all on the commit before"

and the reason is that Will moved the test for whether we need to flush
from tlb_flush_mmu() into tlb_flush_mmu_tlbonly().  But that meant that
tlb_flush_mmu_free() basically lost that check.

Move it back into tlb_flush_mmu() where it belongs, so that it covers
both tlb_flush_mmu_tlbonly() _and_ tlb_flush_mmu_free().

Reported-and-tested-by: Dave Hansen <dave@sr71.net>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory.c