linux/drivers/staging
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
..
android staging: alarm-dev: Implement compat_ioctl support 2013-01-18 12:37:11 -08:00
asus_oled
bcm Staging: bcm: copying more data than intended 2013-01-17 13:52:37 -08:00
ccg
ced1401
comedi staging/comedi/adl_pci8164: Don't assign string 2013-01-29 23:11:41 -05:00
cptm1217
crystalhd
csr staging/csr: Use kmemdup rather than duplicating its implementation 2013-01-29 23:22:16 -05:00
cxt1e1 staging: cxt1e1: buffer overflow in do_del_chan() 2013-01-25 11:21:26 -08:00
dgrp staging: dgrp: check for a valid proc dir entry pointer 2013-01-22 08:58:44 -08:00
echo
et131x staging: et131x: Fix all sparse warnings 2013-01-22 09:15:18 -08:00
frontier
ft1000
fwserial
gdm72xx
goldfish goldfish: NAND flash driver 2013-01-24 13:53:23 -08:00
iio iio:light:tsl2563 move out of staging 2013-01-27 17:37:24 +00:00
imx-drm staging: ipu-di: Change DI address info to dev_dbg 2013-01-17 13:52:37 -08:00
keucr
line6 staging: line6: clean up line6_variax_process_message() 2013-01-20 15:57:47 -08:00
media
net
nvec
octeon
olpc_dcon
omap-thermal staging: omap-thermal/omap-bandgap.c: adjust duplicate test 2013-01-21 14:00:10 -08:00
omapdrm staging/omapdrm: Use kmemdup rather than duplicating its implementation 2013-01-29 23:22:16 -05:00
ozwpan staging:ozwpan: Change email address. 2013-01-25 11:23:07 -08:00
panel
phison
quickstart
rtl8187se
rtl8192e
rtl8192u
rtl8712
rts5139
sb105x Merge 3.8-rc5 into staging-next 2013-01-25 21:25:02 -08:00
sbe-2t3e3
sep staging: sep: remove assignment to i and j in sep_crypto_setup 2013-01-22 08:58:44 -08:00
serqt_usb2
silicom
slicoss staging: slicoss: Fix space-related checkpatch.pl warnings 2013-01-17 13:53:06 -08:00
sm7xxfb
speakup Staging: speakup: kobjects.c: checkpatch.pl fixes 2013-01-17 13:31:07 -08:00
ste_rmi4
tidspbridge staging: tidspbridge/pmgr: another using strlcpy instead of strncpy 2013-01-21 14:00:10 -08:00
usbip staging: usbip: replace the interrupt safe spinlocks with common ones. 2013-01-22 09:00:10 -08:00
vme
vt6655 staging: vt6655: no braces needed for single statement if , for blocks 2013-01-17 13:17:03 -08:00
vt6656 Merge 3.8-rc5 into staging-next 2013-01-25 21:25:02 -08:00
winbond
wlags49_h2
wlags49_h25
wlan-ng Merge 3.8-rc5 into staging-next 2013-01-25 21:25:02 -08:00
xgifb staging: xgifb: delete pVBInfo->BaseAddr 2013-01-21 14:00:10 -08:00
zcache Staging: zcache: remove unnecessary braces in zcache-main.c 2013-01-29 23:22:16 -05:00
zram Merge 3.8-rc5 into staging-next 2013-01-25 21:25:02 -08:00
zsmalloc staging: zsmalloc: Fix TLB coherency and build problem 2013-01-29 23:22:16 -05:00
Kconfig goldfish: audio support 2013-01-24 13:51:38 -08:00
Makefile goldfish: audio support 2013-01-24 13:51:38 -08:00
staging.c