ARM: 7446/1: spinlock: use ticket algorithm for ARMv6+ locking implementation
authorWill Deacon <will.deacon@arm.com>
Fri, 6 Jul 2012 14:43:41 +0000 (15:43 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 9 Jul 2012 16:41:10 +0000 (17:41 +0100)
commit546c2896a42202dbc7d02f7c6ec9948ac1bf511b
tree8b83e208144d3c157984946e77ec59d1545d0537
parent575320d625d5b5eb115575a1f5e17af456e69577
ARM: 7446/1: spinlock: use ticket algorithm for ARMv6+ locking implementation

Ticket spinlocks ensure locking fairness by introducing a FIFO-like
nature to the granting of lock acquisitions and also reducing the
thundering herd effect when spinning on a lock by allowing the cacheline
to remain in a shared state amongst the waiting CPUs. This is especially
important on systems where memory-access times are not necessarily
uniform when accessing the lock structure (for example, on a
multi-cluster platform where the lock is allocated into L1 when a CPU
releases it).

This patch implements the ticket spinlock algorithm for ARM, replacing
the simpler implementation for ARMv6+ processors.

Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/spinlock.h
arch/arm/include/asm/spinlock_types.h
This page took 0.025814 seconds and 5 git commands to generate.