linux-stable/arch
Lennert Buytenhek 39ec58f3fe [ARM] alternative copy_to_user/clear_user implementation
This implements {copy_to,clear}_user() by faulting in the userland
pages and then using the regular kernel mem{cpy,set}() to copy the
data (while holding the page table lock).  This is a win if the regular
mem{cpy,set}() implementations are faster than the user copy functions,
which is the case e.g. on Feroceon, where 8-word STMs (which memcpy()
uses under the right conditions) give significantly higher memory write
throughput than a sequence of individual 32bit stores.

Here are numbers for page sized buffers on some Feroceon cores:

 - copy_to_user on Orion5x goes from 51 MB/s to 83 MB/s
 - clear_user on Orion5x goes from 89MB/s to 314MB/s
 - copy_to_user on Kirkwood goes from 240 MB/s to 356 MB/s
 - clear_user on Kirkwood goes from 367 MB/s to 1108 MB/s
 - copy_to_user on Disco-Duo goes from 248 MB/s to 398 MB/s
 - clear_user on Disco-Duo goes from 328 MB/s to 1741 MB/s

Because the setup cost is non negligible, this is worthwhile only if
the amount of data to copy is large enough.  The operation falls back
to the standard implementation when the amount of data is below a certain
threshold. This threshold was determined empirically, however some targets
could benefit from a lower runtime determined value for optimal results
eventually.

In the copy_from_user() case, this technique does not provide any
worthwhile performance gain due to the fact that any kind of read access
allocates the cache and subsequent 32bit loads are just as fast as the
equivalent 8-word LDM.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Tested-by: Martin Michlmayr <tbm@cyrius.com>
2009-05-29 22:36:45 -04:00
..
alpha alpha: unbreak percpu again 2009-05-12 14:11:35 -07:00
arm [ARM] alternative copy_to_user/clear_user implementation 2009-05-29 22:36:45 -04:00
avr32 avr32: drop unused CLEAN_FILES 2009-05-01 10:54:00 +02:00
blackfin clocksource: pass clocksource to read() callback 2009-04-21 13:41:47 -07:00
cris CRISv32: Fix typo compile error in ARTPEC-3 gpio driver. 2009-04-28 19:08:10 +02:00
frv FRV: Use __INIT macro instead of .text.init. 2009-04-27 19:46:30 -07:00
h8300 Get rid of final remnants of include/asm-$(ARCH) 2009-04-17 09:59:27 -07:00
ia64 [IA64] xen_domu_defconfig: fix build issues/warnings 2009-05-05 11:43:13 -07:00
m32r m32r: use __stringify() macro in assembler.h 2009-05-02 22:38:21 +09:00
m68k m68k: arch/m68k/kernel/sun3-head.S needs <linux/init.h> 2009-04-28 16:07:18 -07:00
m68knommu Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2009-04-24 08:45:53 -07:00
microblaze microblaze: Fix kind-of-intr checking against number of interrupts 2009-05-18 14:47:42 +02:00
mips MIPS: IP32: Remove unnecessary if not even harmful volatile keywords. 2009-05-22 13:52:06 +01:00
mn10300 mn10300: convert to use __HEAD and HEAD_TEXT macros. 2009-04-26 09:20:38 -07:00
parisc Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6 2009-04-03 09:52:04 -07:00
powerpc powerpc/maple: Add a quirk to disable MSI for IPR on Bimini 2009-05-22 16:01:11 +10:00
s390 s390: convert to use __HEAD and HEAD_TEXT macros. 2009-04-26 09:20:39 -07:00
sh sh: ap325 camera without i2c driver fix 2009-05-22 13:19:11 +09:00
sparc sparc: cleanup references to deprecated .text.init* sections. 2009-04-27 19:51:58 -07:00
um uml: kill a kconfig warning 2009-04-21 13:41:50 -07:00
x86 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-05-18 09:17:37 -07:00
xtensa xtensa: Fix linker script to include .literal sections 2009-05-11 23:40:33 -07:00
.gitignore
Kconfig mutex: have non-spinning mutexes on s390 by default 2009-04-09 19:28:24 +02:00