kernel-ark/arch
Eric Dumazet aacf682fd8 x86: atomic64: Improve atomic64_read()
Linus noticed that the 32-bit version of atomic64_read() was
being overly complex with re-reading the value and doing a
retry loop over that.

Instead we can just rely on cmpxchg8b returning either the new
value or returning the current value.

We can use any 'old' value, which will be faster as it can be
loaded via immediates. Using some value that is not equal to
the real value in memory the instruction gets faster.

This also has the advantage that the CPU could avoid dirtying
the cacheline.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
LKML-Reference: <alpine.LFD.2.01.0907021653030.3210@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-07-03 13:26:40 +02:00
..
alpha alpha: fix percpu build breakage 2009-06-30 18:55:59 -07:00
arm [ARM] 5562/2: at91: add gpio button support for at91sam9g20ek 2009-06-29 11:19:27 +01:00
avr32 Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
blackfin Blackfin: fix dma-mapping build errors 2009-06-22 22:31:00 -04:00
cris Merge branch 'for-linus' of git://www.jni.nu/cris 2009-06-23 10:47:01 -07:00
frv FRV: Wire up new syscalls 2009-06-30 18:58:37 -07:00
h8300 h8/300: fix incorrect "select" directives in arch/h8300/Kconfig.cpu. 2009-06-23 12:50:05 -07:00
ia64 [IA64] address compiler warnings perfmon.c/salinfo.c 2009-06-30 14:26:34 -07:00
m32r Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
m68k Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
m68knommu ptrace: remove PT_DTRACE from m68k, m68knommu 2009-06-18 13:03:48 -07:00
microblaze Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
mips MIPS: Cavium: Add CPU hotplugging code. 2009-06-24 18:34:40 +01:00
mn10300 MN10300: Wire up new syscalls 2009-06-30 18:58:37 -07:00
parisc Move FAULT_FLAG_xyz into handle_mm_fault() callers 2009-06-21 13:08:22 -07:00
powerpc powerpc/perf_counter: Enable alternate PR/HV bits for POWER7 2009-07-01 10:20:28 +02:00
s390 KVM: s390: Allow stfle instruction in the guest 2009-06-28 14:10:30 +03:00
sh sh: Fix up HAVE_PERF_COUNTERS typo. 2009-06-24 01:41:05 +09:00
sparc sparc32: Fix makefile not generating required files 2009-06-25 19:56:02 -07:00
um UML: Fix some apparent bitrot 2009-06-25 11:22:13 -07:00
x86 x86: atomic64: Improve atomic64_read() 2009-07-03 13:26:40 +02:00
xtensa xtensa: enable m41t80 driver in s6105_defconfig 2009-06-22 02:38:11 -07:00
.gitignore
Kconfig gcov: add gcov profiling infrastructure 2009-06-18 13:03:57 -07:00