linux/include/asm-generic
Nick Piggin a8ddac7e53 mutex: speed up generic mutex implementations
- atomic operations which both modify the variable and return something imply
  full smp memory barriers before and after the memory operations involved
  (failing atomic_cmpxchg, atomic_add_unless, etc don't imply a barrier because
  they don't modify the target). See Documentation/atomic_ops.txt.
  So remove extra barriers and branches.

- All architectures support atomic_cmpxchg. This has no relation to
  __HAVE_ARCH_CMPXCHG. We can just take the atomic_cmpxchg path unconditionally

This reduces a simple single threaded fastpath lock+unlock test from 590 cycles
to 203 cycles on a ppc970 system.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-23 09:18:20 -07:00
..
2008-07-04 10:40:04 -07:00
2008-10-20 15:29:57 -07:00
2008-02-06 10:41:00 -08:00
2008-05-01 08:03:58 -07:00
2007-07-16 09:05:45 -07:00
2008-10-16 11:21:40 -07:00
2008-08-12 16:07:31 -07:00
2008-05-02 16:18:19 -07:00
2008-07-15 13:58:40 -07:00
2007-05-11 08:29:34 -07:00
2008-10-20 08:52:41 -07:00
2008-09-05 14:39:38 -07:00