android_kernel_samsung_msm8976/arch/arm/mm
Lorenzo Pieralisi d6e30a2883 ARM: 7919/1: mm: refactor v7 cache cleaning ops to use way/index sequence
Set-associative caches on all v7 implementations map the index bits
to physical addresses LSBs and tag bits to MSBs. As the last level
of cache on current and upcoming ARM systems grows in size,
this means that under normal DRAM controller configurations, the
current v7 cache flush routine using set/way operations triggers a
DRAM memory controller precharge/activate for every cache line
writeback since the cache routine cleans lines by first fixing the
index and then looping through ways (index bits are mapped to lower
physical addresses on all v7 cache implementations; this means that,
with last level cache sizes in the order of MBytes, lines belonging
to the same set but different ways map to different DRAM pages).

Given the random content of cache tags, swapping the order between
indexes and ways loops do not prevent DRAM pages precharge and
activate cycles but at least, on average, improves the chances that
either multiple lines hit the same page or multiple lines belong to
different DRAM banks, improving throughput significantly.

This patch swaps the inner loops in the v7 cache flushing routine
to carry out the clean operations first on all sets belonging to
a given way (looping through sets) and then decrementing the way.

Benchmarks showed that by swapping the ordering in which sets and
ways are decremented in the v7 cache flushing routine, that uses
set/way operations, time required to flush caches is reduced
significantly, owing to improved writebacks throughput to the DRAM
controller.

Benchmarks results vary and depend heavily on the last level of
cache tag RAM content when cache is cleaned and invalidated, ranging
from 2x throughput when all tag RAM entries contain dirty lines
mapping to sequential pages of RAM to 1x (ie no improvement) when
all tag RAM accesses trigger a DRAM precharge/activate cycle, as the
current code implies on most DRAM controller configurations.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2019-07-27 21:53:24 +02:00
..
Kconfig This is the 3.10.67 stable release 2015-04-24 18:04:40 -07:00
Makefile
abort-ev4.S
abort-ev4t.S
abort-ev5t.S
abort-ev5tj.S
abort-ev6.S ARM: 8128/1: abort: don't clear the exclusive monitors 2014-10-05 14:54:10 -07:00
abort-ev7.S ARM: 8128/1: abort: don't clear the exclusive monitors 2014-10-05 14:54:10 -07:00
abort-lv4t.S
abort-macro.S
abort-nommu.S
alignment.c This is the 3.10.67 stable release 2015-04-24 18:04:40 -07:00
cache-aurora-l2.h
cache-fa.S
cache-feroceon-l2.c
cache-l2x0.c
cache-tauros2.c
cache-v4.S
cache-v4wb.S
cache-v4wt.S
cache-v6.S
cache-v7.S ARM: 7919/1: mm: refactor v7 cache cleaning ops to use way/index sequence 2019-07-27 21:53:24 +02:00
cache-xsc3l2.c
context.c arm: SMC call to flush branch predictor. 2019-07-27 21:50:37 +02:00
copypage-fa.c
copypage-feroceon.c
copypage-v4mc.c
copypage-v4wb.c
copypage-v4wt.c
copypage-v6.c
copypage-xsc3.c
copypage-xscale.c
dma-mapping.c This is the 3.10.94 stable release 2017-04-18 17:12:56 +02:00
dump.c
extable.c
fault-armv.c
fault.c arm: Invalidate icache on prefetch abort outside of user mapping on Cortex-A57/72. 2019-07-27 21:50:38 +02:00
fault.h
flush.c
fsr-2level.c arm: Invalidate BTB on prefetch abort outside of user mapping on Cortex A8, A9, A12 and A17. 2019-07-27 21:50:37 +02:00
fsr-3level.c arm: Invalidate BTB on prefetch abort outside of user mapping on Cortex A8, A9, A12 and A17. 2019-07-27 21:50:37 +02:00
highmem.c
hugetlbpage.c
idmap.c ARM: 8115/1: LPAE: reduce damage caused by idmap to virtual memory layout 2014-08-07 14:30:25 -07:00
init.c arm: mm: fix and cleanup function to print vmalloc info 2015-06-30 01:31:14 -07:00
iomap.c
ioremap.c ARM: 8799/1: mm: fix pci_ioremap_io() offset check 2019-07-27 21:52:37 +02:00
mm.h
mmap.c mm: larger stack guard gap, between vmas 2017-07-11 00:00:39 +00:00
mmu.c arm: mm: consider only lowmem regions while remap 2015-06-30 12:09:42 +05:30
nommu.c ARM: constify machine_desc structure uses 2014-08-15 11:45:32 -07:00
pabort-legacy.S
pabort-v6.S
pabort-v7.S
pgd.c
proc-arm7tdmi.S
proc-arm9tdmi.S
proc-arm720.S
proc-arm740.S
proc-arm920.S
proc-arm922.S
proc-arm925.S
proc-arm926.S
proc-arm940.S
proc-arm946.S
proc-arm1020.S
proc-arm1020e.S
proc-arm1022.S
proc-arm1026.S
proc-fa526.S
proc-feroceon.S
proc-macros.S
proc-mohawk.S
proc-sa110.S
proc-sa1100.S
proc-syms.c
proc-v6.S
proc-v7-2level.S arm: SMC call to flush branch predictor. 2019-07-27 21:50:37 +02:00
proc-v7-3level.S arm: SMC call to flush branch predictor. 2019-07-27 21:50:37 +02:00
proc-v7.S arm: SMC call to flush branch predictor. 2019-07-27 21:50:37 +02:00
proc-xsc3.S
proc-xscale.S ARM: 8216/1: xscale: correct auxiliary register in suspend/resume 2014-12-06 15:05:48 -08:00
tcm.h
tlb-fa.S
tlb-v4.S
tlb-v4wb.S
tlb-v4wbi.S
tlb-v6.S
tlb-v7.S