linux-stable/arch/arm
Lorenzo Pieralisi 70f665fe77 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>
2013-12-29 12:32:40 +00:00
..
boot Renesas ARM based SoC fixes for v3.13 2013-12-20 11:28:30 -08:00
common ARM: 7918/1: clean up cache handling in core code 2013-12-29 12:32:38 +00:00
configs ARM: multi_v7_defconfig: enable SDHCI_BCM_KONA and MMC_BLOCK_MINORS=16 2013-12-03 12:39:14 -08:00
crypto
include ARM: 7896/1: rename ioremap_cached to ioremap_cache 2013-12-29 12:32:29 +00:00
kernel ARM: 7918/1: clean up cache handling in core code 2013-12-29 12:32:38 +00:00
kvm Fix percpu vmalloc allocations 2013-11-19 10:43:05 +02:00
lib ARM: make kernel oops easier to read 2013-12-29 12:32:30 +00:00
mach-at91 ARM: SoC fixes for 3.13-rc 2013-12-04 08:56:18 -08:00
mach-bcm BCM changes for 3.13/soc. A number of cleanup related changes. 2013-10-30 14:03:39 -07:00
mach-bcm2835 Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-11-12 10:02:59 +09:00
mach-clps711x ARM: clps711x: Use linux/sched_clock.h 2013-10-11 14:50:10 -07:00
mach-cns3xxx
mach-davinci This pull request includes a patch 2013-12-04 14:28:26 -08:00
mach-dove ARM: driver updates for 3.13 2013-11-11 17:05:37 +09:00
mach-ebsa110
mach-ep93xx usb: ohci: remove ep93xx bus glue platform driver 2013-10-29 16:43:37 -07:00
mach-exynos ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00
mach-footbridge ARM: footbridge: fix EBSA285 LEDs 2013-11-30 22:20:59 +00:00
mach-gemini GPIO bulk changes for the v3.13 development cycle 2013-11-12 15:50:46 +09:00
mach-highbank ARM: highbank: handle soft poweroff and reset key events 2013-12-04 09:28:50 -08:00
mach-imx Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2013-11-18 15:50:07 -08:00
mach-integrator Few clock fixes, a runtime PM fix, and pinctrl-single fix along 2013-11-15 15:17:59 -08:00
mach-iop13xx dmaengine: remove DMA unmap from drivers 2013-11-14 11:04:38 -08:00
mach-iop32x
mach-iop33x
mach-ixp4xx Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 08:51:29 +09:00
mach-keystone DeviceTree updates for 3.13. This is a bit larger pull request than 2013-11-12 16:52:17 +09:00
mach-kirkwood Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2013-11-18 15:50:07 -08:00
mach-ks8695
mach-lpc32xx
mach-mmp fbdev changes for 3.13 2013-11-14 14:44:20 +09:00
mach-msm Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-11-12 10:36:00 +09:00
mach-mv78xx0
mach-mvebu ARM: mvebu: support running big-endian 2013-10-19 20:46:34 +01:00
mach-mxs ARM: SoC DT updates for 3.13 2013-11-11 17:34:56 +09:00
mach-netx
mach-nomadik
mach-nspire
mach-omap1 Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2013-11-18 15:50:07 -08:00
mach-omap2 Revert "ARM: OMAP2+: Remove legacy mux code for display.c" 2013-12-17 16:28:34 -08:00
mach-orion5x
mach-picoxcell
mach-prima2
mach-pxa ARM: pxa: prevent PXA270 occasional reboot freezes 2013-12-11 16:35:16 -08:00
mach-realview
mach-rockchip ARM: SoC board updates for 3.13 2013-11-11 16:57:16 +09:00
mach-rpc
mach-s3c24xx Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2013-11-18 15:50:07 -08:00
mach-s3c64xx ARM: s3c64xx: dt: Fix boot failure due to double clock initialization 2013-12-13 21:48:25 -08:00
mach-s5p64x0 ARM: SAMSUNG: Initialize PWM backlight enable_gpio field 2013-10-16 09:05:57 +02:00
mach-s5pc100 ARM: SAMSUNG: Initialize PWM backlight enable_gpio field 2013-10-16 09:05:57 +02:00
mach-s5pv210 pwm: Changes for v3.13-rc1 2013-11-16 12:21:40 -08:00
mach-sa1100 ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00
mach-shmobile ARM: shmobile: lager: phy fixup needs CONFIG_PHYLIB 2013-11-24 15:53:27 +09:00
mach-socfpga arm: socfpga: Enable ARM_TWD for socfpga 2013-12-03 14:19:48 -08:00
mach-spear
mach-sti ARM: SoC fixes for 3.13 merge window 2013-11-16 12:45:55 -08:00
mach-sunxi ARM: sunxi: remove .init_time hooks 2013-10-28 10:19:45 -07:00
mach-tegra ARM: tegra: add missing break to fuse initialization code 2013-12-11 17:09:11 -08:00
mach-u300 DeviceTree updates for 3.13. This is a bit larger pull request than 2013-11-12 16:52:17 +09:00
mach-ux500 Revert "ARM: ux500: Stop passing MMC's platform data for Device Tree boots" 2013-11-26 21:02:20 +01:00
mach-versatile
mach-vexpress ARM: vexpress/TC2: Implement MCPM power_down_finish() 2013-11-25 14:12:14 -08:00
mach-virt
mach-vt8500
mach-w90x900
mach-zynq ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00
mm ARM: 7919/1: mm: refactor v7 cache cleaning ops to use way/index sequence 2013-12-29 12:32:40 +00:00
net Merge branch 'devel-stable' into for-next 2013-11-12 10:58:59 +00:00
nwfpe
oprofile
plat-iop
plat-omap ARM: OMAP2+: Disable POSTED mode for errata i103 and i767 2013-11-26 15:03:36 -08:00
plat-orion
plat-pxa
plat-samsung pwm: Changes for v3.13-rc1 2013-11-16 12:21:40 -08:00
plat-versatile ARM: vexpress: add big endian support 2013-10-19 20:46:34 +01:00
tools
vfp ARM: 7873/1: vfp: clear vfp_current_hw_state for dying cpu 2013-10-30 22:10:10 +00:00
xen arm: xen: foreign mapping PTEs are special. 2013-12-11 17:06:05 +00:00
Kconfig Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm 2013-11-22 09:56:51 -08:00
Kconfig-nommu
Kconfig.debug Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 08:51:29 +09:00
Makefile Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 08:51:29 +09:00