linux/arch/powerpc/lib
Anton Blanchard a9514dc69d powerpc: Use enhanced touch instructions in POWER7 copy_to_user/copy_from_user
Version 2.06 of the POWER ISA introduced enhanced touch instructions,
allowing us to specify a number of attributes including the length of
a stream.

This patch adds a software stream for both loads and stores in the
POWER7 copy_tofrom_user loop. Since the setup is quite complicated
and we have to use an eieio to ensure correct ordering of the "GO"
command we only do this for copies above 4kB.

To quantify any performance improvements we need a working set
bigger than the caches so we operate on a 1GB file:

# dd if=/dev/zero of=/tmp/foo bs=1M count=1024

And we compare how fast we can read the file:

# dd if=/tmp/foo of=/dev/null bs=1M

before: 7.7 GB/s
after:  9.6 GB/s

A 25% improvement.

The worst case for this patch will be a completely L1 cache contained
copy of just over 4kB. We can test this with the copy_to_user
testcase we used to tune copy_tofrom_user originally:

http://ozlabs.org/~anton/junkcode/copy_to_user.c

# time ./copy_to_user2 -l 4224 -i 10000000

before: 6.807 s
after:  6.946 s

A 2% slowdown, which seems reasonable considering our data is unlikely
to be completely L1 contained.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-03 14:14:42 +10:00
..
alloc.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
checksum_32.S powerpc: Rename files to have consistent _32/_64 suffixes 2005-10-10 21:52:43 +10:00
checksum_64.S powerpc: Optimise 64bit csum_partial_copy_generic and add csum_and_copy_from_user 2010-09-02 14:07:30 +10:00
checksum_wrappers_64.c powerpc: various straight conversions from module.h --> export.h 2011-10-31 19:30:44 -04:00
code-patching.c powerpc: Have patch_instruction detect faults 2012-07-03 14:14:38 +10:00
copy_32.S powerpc: Fix incorrect .stabs entry for copy_32.S 2010-09-02 14:07:34 +10:00
copypage_64.S powerpc: Simplify 4k/64k copy_page logic 2011-05-19 14:30:42 +10:00
copyuser_64.S powerpc: Remove CONFIG_POWER4_ONLY 2012-04-30 15:37:26 +10:00
copyuser_power7.S powerpc: Use enhanced touch instructions in POWER7 copy_to_user/copy_from_user 2012-07-03 14:14:42 +10:00
copyuser_power7_vmx.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
crtsavres.S powerpc: Fix module building for gcc 4.5 and 64 bit 2010-07-08 18:11:38 +10:00
devres.c powerpc: various straight conversions from module.h --> export.h 2011-10-31 19:30:44 -04:00
div64.S powerpc: Fix a corner case in __div64_32 2005-10-20 09:37:02 +10:00
feature-fixups-test.S powerpc: Ensure the else case of feature sections will fit 2011-01-21 14:08:33 +11:00
feature-fixups.c powerpc: Copy down exception vectors after feature fixups 2011-11-16 14:47:54 +11:00
hweight_64.S powerpc: Hardcode popcnt instructions for old assemblers 2010-12-09 15:35:30 +11:00
ldstfp.S powerpc: mtmsrd not defined 2010-09-02 14:07:34 +10:00
locks.c powerpc: Remove FW_FEATURE ISERIES from arch code 2012-03-21 11:16:11 +11:00
Makefile powerpc: 64bit optimised __clear_user 2012-07-03 14:14:41 +10:00
mem_64.S powerpc: Remove CONFIG_POWER4_ONLY 2012-04-30 15:37:26 +10:00
memcpy_64.S powerpc: Remove CONFIG_POWER4_ONLY 2012-04-30 15:37:26 +10:00
rheap.c powerpc: various straight conversions from module.h --> export.h 2011-10-31 19:30:44 -04:00
sstep.c Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2011-05-20 13:28:01 -07:00
string.S powerpc: 64bit optimised __clear_user 2012-07-03 14:14:41 +10:00
string_64.S powerpc: 64bit optimised __clear_user 2012-07-03 14:14:41 +10:00
usercopy_64.c powerpc: Rename files to have consistent _32/_64 suffixes 2005-10-10 21:52:43 +10:00