linux-stable/drivers
Minchan Kim 9915518887 staging: zsmalloc: Fix TLB coherency and build problem
Recently, Matt Sealey reported he fail to build zsmalloc caused by
using of local_flush_tlb_kernel_range which are architecture dependent
function so !CONFIG_SMP in ARM couldn't implement it so it ends up
build error following as.

  MODPOST 216 modules
  LZMA    arch/arm/boot/compressed/piggy.lzma
  AS      arch/arm/boot/compressed/lib1funcs.o
ERROR: "v7wbi_flush_kern_tlb_range"
[drivers/staging/zsmalloc/zsmalloc.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
make: *** Waiting for unfinished jobs....

The reason we used that function is copy method by [1]
was really slow in ARM but at that time.

More severe problem is ARM can prefetch speculatively on other CPUs
so under us, other TLBs can have an entry only if we do flush local
CPU. Russell King pointed that. Thanks!
We don't have many choices except using flush_tlb_kernel_range.

My experiment in ARMv7 processor 4 core didn't make any difference with
zsmapbench[2] between local_flush_tlb_kernel_range and flush_tlb_kernel_range
but still page-table based is much better than copy-based.

* bigger is better.

1. local_flush_tlb_kernel_range: 3918795 mappings
2. flush_tlb_kernel_range : 3989538 mappings
3. copy-based: 635158 mappings

This patch replace local_flush_tlb_kernel_range with
flush_tlb_kernel_range which are avaialbe in all architectures
because we already have used it in vmalloc allocator which are
generic one so build problem should go away and performane loss
shoud be void.

[1] f553646, zsmalloc: add page table mapping method
[2] https://github.com/spartacus06/zsmapbench

Cc: stable@vger.kernel.org
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Konrad Rzeszutek Wilk <konrad@darnok.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Seth Jennings <sjenning@linux.vnet.ibm.com>
Reported-by: Matt Sealey <matt@genesi-usa.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-29 23:22:16 -05:00
..
accessibility
acpi ACPI: Check MSR valid bit before using P-state frequencies 2013-01-22 13:37:21 +01:00
amba
ata [libata] replace sata_settings with devslp_timing 2013-01-14 13:29:15 -05:00
atm
auxdisplay
base Merge remote-tracking branch 'regmap/fix/debugfs' into tmp 2013-01-24 19:04:16 +08:00
bcma
block Various minor fixes, but a slightly more complex one to fix the per-cpu overload 2013-01-20 16:44:28 -08:00
bluetooth
bus
cdrom
char
clk mvebu fixes for v3.8-rc5 2013-01-23 20:30:52 -08:00
clocksource
connector
cpufreq cpufreq: Add module aliases for acpi-cpufreq 2013-01-22 22:33:46 +01:00
cpuidle cpuidle: remove the power_specified field in the driver 2013-01-15 14:18:04 +01:00
crypto
dca
devfreq PM / devfreq: exynos4_bus: honor RCU lock usage 2013-01-22 13:28:40 +01:00
dio
dma Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma 2013-01-24 10:17:49 -08:00
edac
eisa
extcon
firewire
firmware
gpio gpio: mvebu: Don't free chip label memory 2013-01-17 12:27:08 +01:00
gpu ttm: on move memory failure don't leave a node dangling 2013-01-21 13:45:23 +10:00
hid
hsi
hv Drivers: hv: balloon: Fix a memory leak 2013-01-17 11:58:00 -08:00
hwmon
hwspinlock
i2c i2c-designware: add missing MODULE_LICENSE 2013-01-22 16:43:34 +01:00
ide
idle intel_idle: Don't register CPU notifier if we are not running. 2013-01-18 13:43:43 +01:00
iio iio:light:tsl2563 move out of staging 2013-01-27 17:37:24 +00:00
infiniband
input
iommu
ipack
irqchip
isdn
leds
lguest
macintosh
md
media ARM: arm-soc: Fixes for 3.8-rc, take 2 2013-01-24 12:42:50 -08:00
memory
memstick
message
mfd mfd: vexpress-sysreg: Don't skip initialization on probe 2013-01-24 12:19:23 +00:00
misc Revert "drivers/misc/ti-st: remove gpio handling" 2013-01-22 17:22:47 -08:00
mmc mvebu fixes for v3.8-rc5 2013-01-23 20:30:52 -08:00
mtd
net be2net: fix unconditionally returning IRQ_HANDLED in INTx 2013-01-12 15:33:01 -08:00
nfc
nubus
of
oprofile
parisc
parport
pci PCI updates for v3.8: 2013-01-22 16:36:23 -08:00
pcmcia
pinctrl
platform Merge 3.8-rc5 into staging-next 2013-01-25 21:25:02 -08:00
pnp
power
pps
ps3
ptp
pwm
rapidio
regulator Merge remote-tracking branch 'regulator/fix/s5m8767' into tmp 2013-01-15 09:38:59 +09:00
remoteproc
rpmsg
rtc rtc: hid-sensor-time: Add missing spin_lock_init 2013-01-26 10:07:52 +00:00
s390 s390/chsc: fix SEI usage 2013-01-16 15:57:54 +01:00
sbus
scsi
sfi
sh
sn
spi
ssb
staging staging: zsmalloc: Fix TLB coherency and build problem 2013-01-29 23:22:16 -05:00
target
tc
thermal
tty 8250/16?50: Add support for Broadcom TruManage redirected serial port 2013-01-17 14:02:55 -08:00
uio
usb USB: EHCI: fix build error in ehci-mxc 2013-01-23 11:27:08 -08:00
uwb
vfio vfio-pci: Fix buffer overfill 2013-01-15 10:45:26 -07:00
vhost
video This is yet another critical imxfb fixes held off by absence of FB 2013-01-23 20:35:02 -08:00
virt
virtio
vlynq
vme
w1
watchdog
xen Fixes: 2013-01-18 12:02:52 -08:00
zorro
Kconfig
Makefile