linux/arch/powerpc
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
..
boot powerpc/boot: Only build board support files when required. 2012-07-03 14:14:37 +10:00
configs powerpc: Enable jump label support 2012-07-03 14:14:40 +10:00
include/asm powerpc: tracing: Avoid tracepoint duplication with DECLARE_EVENT_CLASS 2012-07-03 14:14:41 +10:00
kernel powerpc/smp: remove call to ipi_call_lock()/ipi_call_unlock() 2012-07-03 14:14:42 +10:00
kvm KVM: PPC: Book3S HV: Drop locks around call to kvmppc_pin_guest_page 2012-06-19 15:04:13 +03:00
lib powerpc: Use enhanced touch instructions in POWER7 copy_to_user/copy_from_user 2012-07-03 14:14:42 +10:00
math-emu powerpc/math_emu/efp: Look for errata handler when type mismatches 2011-10-06 23:36:47 -05:00
mm powerpc: Fix uninitialised error in numa.c 2012-06-29 14:35:35 +10:00
net powerpc: Fix BPF_JIT code to link with multiple TOCs 2012-06-29 14:35:34 +10:00
oprofile Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
perf perf: Pass last sampling period to perf_sample_data_init() 2012-05-09 15:23:12 +02:00
platforms powerpc/pseries/cpuidle: Replace pseries_notify_cpuidle_add call with notifier 2012-07-03 14:14:40 +10:00
sysdev Merge remote-tracking branch 'jwb/next' into next 2012-05-10 12:58:24 +10:00
xmon Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
Kconfig powerpc: Use the new generic strncpy_from_user() and strnlen_user() 2012-05-27 21:00:07 -07:00
Kconfig.debug irqdomain: Remove powerpc dependency from debugfs file 2012-03-29 14:31:02 -06:00
Makefile powerpc/crypto: Build files for the nx device driver 2012-05-16 15:05:45 +10:00
relocs_check.pl powerpc: Process dynamic relocations for kernel 2011-12-20 10:21:08 -05:00