ARM: 7983/1: atomics: implement a better __atomic_add_unless for v6+
authorWill Deacon <will.deacon@arm.com>
Fri, 21 Feb 2014 16:01:48 +0000 (17:01 +0100)
committerGrazvydas Ignotas <notasas@gmail.com>
Thu, 2 Jul 2015 00:09:54 +0000 (03:09 +0300)
commite8b769774a6f0d4a62924c960361d6403583c907
tree5ff3cd7dac435c6a91c442dfd0b185a26f3e5894
parent691b98721bd80ffb19afa25aa2e63c0b19ccfcd7
ARM: 7983/1: atomics: implement a better __atomic_add_unless for v6+

Looking at perf profiles of multi-threaded hackbench runs, a significant
performance hit appears to manifest from the cmpxchg loop used to
implement the 32-bit atomic_add_unless function. This can be mitigated
by writing a direct implementation of __atomic_add_unless which doesn't
require iteration outside of the atomic operation.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Conflicts:
arch/arm/include/asm/atomic.h
arch/arm/include/asm/atomic.h