linux-stable/arch/powerpc/mm
Aneesh Kumar K.V aefa5688c0 powerpc/mm: don't do tlbie for updatepp request with NO HPTE fault
upatepp can get called for a nohpte fault when we find from the linux
page table that the translation was hashed before. In that case
we are sure that there is no existing translation, hence we could
avoid doing tlbie.

We could possibly race with a parallel fault filling the TLB. But
that should be ok because updatepp is only ever relaxing permissions.
We also look at linux pte permission bits when filling hash pte
permission bits. We also hold the linux pte busy bits while
inserting/updating a hashpte entry, hence a paralle update of
linux pte is not possible. On the other hand mprotect involves
ptep_modify_prot_start which cause a hpte invalidate and not updatepp.

Performance number:
We use randbox_access_bench written by Anton.

Kernel with THP disabled and smaller hash page table size.

    86.60%  random_access_b  [kernel.kallsyms]                [k] .native_hpte_updatepp
     2.10%  random_access_b  random_access_bench              [.] doit
     1.99%  random_access_b  [kernel.kallsyms]                [k] .do_raw_spin_lock
     1.85%  random_access_b  [kernel.kallsyms]                [k] .native_hpte_insert
     1.26%  random_access_b  [kernel.kallsyms]                [k] .native_flush_hash_range
     1.18%  random_access_b  [kernel.kallsyms]                [k] .__delay
     0.69%  random_access_b  [kernel.kallsyms]                [k] .native_hpte_remove
     0.37%  random_access_b  [kernel.kallsyms]                [k] .clear_user_page
     0.34%  random_access_b  [kernel.kallsyms]                [k] .__hash_page_64K
     0.32%  random_access_b  [kernel.kallsyms]                [k] fast_exception_return
     0.30%  random_access_b  [kernel.kallsyms]                [k] .hash_page_mm

With Fix:

    27.54%  random_access_b  random_access_bench              [.] doit
    22.90%  random_access_b  [kernel.kallsyms]                [k] .native_hpte_insert
     5.76%  random_access_b  [kernel.kallsyms]                [k] .native_hpte_remove
     5.20%  random_access_b  [kernel.kallsyms]                [k] fast_exception_return
     5.12%  random_access_b  [kernel.kallsyms]                [k] .__hash_page_64K
     4.80%  random_access_b  [kernel.kallsyms]                [k] .hash_page_mm
     3.31%  random_access_b  [kernel.kallsyms]                [k] data_access_common
     1.84%  random_access_b  [kernel.kallsyms]                [k] .trace_hardirqs_on_caller

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2014-12-05 16:26:15 +11:00
..
40x_mmu.c
44x_mmu.c powerpc: Delete __cpuinit usage from all users 2013-07-01 11:10:36 +10:00
copro_fault.c powerpc/mm: Use appropriate ESID mask in copro_calculate_slb() 2014-10-28 19:52:45 +11:00
dma-noncoherent.c lib/scatterlist: make ARCH_HAS_SG_CHAIN an actual Kconfig 2014-08-08 15:57:26 -07:00
fault.c powerpc/8xx: Invalidate non present TLB as early as possible 2014-11-07 18:10:45 -06:00
fsl_booke_mmu.c powerpc/e6500: TLB miss handler with hardware tablewalk support 2014-01-09 17:52:19 -06:00
hash_low_32.S powerpc: Use CURRENT_THREAD_INFO instead of open coded assembly 2012-07-11 14:18:22 +10:00
hash_low_64.S powerpc/mm: don't do tlbie for updatepp request with NO HPTE fault 2014-12-05 16:26:15 +11:00
hash_native_64.c powerpc/mm: don't do tlbie for updatepp request with NO HPTE fault 2014-12-05 16:26:15 +11:00
hash_utils_64.c powerpc/mm: don't do tlbie for updatepp request with NO HPTE fault 2014-12-05 16:26:15 +11:00
highmem.c
hugepage-hash64.c powerpc/mm: don't do tlbie for updatepp request with NO HPTE fault 2014-12-05 16:26:15 +11:00
hugetlbpage-book3e.c powerpc: Replace __get_cpu_var uses 2014-11-03 12:12:32 +11:00
hugetlbpage-hash64.c powerpc/mm: don't do tlbie for updatepp request with NO HPTE fault 2014-12-05 16:26:15 +11:00
hugetlbpage.c Merge remote-tracking branch 'benh/next' into next 2014-12-02 14:19:20 +11:00
icswx.c powerpc: Fix typo "CONFIG_ICSWX_PID" 2013-04-18 13:03:54 +10:00
icswx.h powerpc/icswx: Fix race condition with IPI setting ACOP 2012-03-07 17:06:09 +11:00
icswx_pid.c powerpc: Split ICSWX ACOP and PID processing 2011-11-25 14:11:27 +11:00
init_32.c powerpc: Remove superfluous bootmem includes 2014-11-10 09:59:26 +11:00
init_64.c powerpc: Remove superfluous bootmem includes 2014-11-10 09:59:26 +11:00
Makefile powerpc/mm: Switch to generic RCU get_user_pages_fast 2014-11-14 17:24:21 +11:00
mem.c powerpc: Move sparse_init() into initmem_init 2014-11-10 09:59:26 +11:00
mmap.c mm: remove free_area_cache 2013-07-10 18:11:34 -07:00
mmu_context_hash32.c powerpc: Remove power3 from comments 2014-07-28 14:10:26 +10:00
mmu_context_hash64.c powerpc: Reduce PTE table memory wastage 2013-04-30 16:00:07 +10:00
mmu_context_nohash.c powerpc: Remove more traces of bootmem 2014-11-19 21:41:51 +11:00
mmu_decl.h powerpc/fsl_booke: smp support for booting a relocatable kernel above 64M 2014-01-09 17:52:18 -06:00
numa.c powerpc: Move sparse_init() into initmem_init 2014-11-10 09:59:26 +11:00
pgtable.c powerpc: Make a bunch of things static 2014-09-25 23:14:41 +10:00
pgtable_32.c powerpc: Remove bootmem allocator 2014-11-10 09:59:25 +11:00
pgtable_64.c powerpc/mm: don't do tlbie for updatepp request with NO HPTE fault 2014-12-05 16:26:15 +11:00
ppc_mmu_32.c powerpc: Remove power3 from comments 2014-07-28 14:10:26 +10:00
slb.c powerpc/cell: Move data segment faulting code out of cell platform 2014-10-08 20:14:55 +11:00
slb_low.S Merge remote-tracking branch 'anton/abiv2' into next 2014-05-05 20:57:12 +10:00
slice.c powerpc/mm: Fix build error with hugetlfs disabled 2014-10-22 14:03:06 +11:00
subpage-prot.c powerpc/mm: Add new "set" flag argument to pte/pmd update function 2014-02-17 11:19:35 +11:00
tlb_hash32.c powerpc: include export.h for files using EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:30:38 -04:00
tlb_hash64.c powerpc/thp: Add tracepoints to track hugepage invalidate 2014-08-13 18:20:42 +10:00
tlb_low_64e.S powerpc/e6500: Work around erratum A-008139 2014-07-29 19:26:29 -05:00
tlb_nohash.c powerpc/nohash: Split __early_init_mmu() into boot and secondary 2014-08-13 15:13:25 +10:00
tlb_nohash_low.S powerpc/fsl_booke: smp support for booting a relocatable kernel above 64M 2014-01-09 17:52:18 -06:00