]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 25 Feb 2014 11:35:08 +0000 (11:35 +0000)
commite1a0bec83cfa227a757a138ba0b83ac8cb3f42d9
tree065fee530d0374306564ea37606617f007af6c64
parent5bc2e637650807f7592fc67651fa57093bc8646a
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>
arch/arm/include/asm/atomic.h