]> git.baikalelectronics.ru Git - kernel.git/commit
ARC: LLOCK/SCOND based rwlock
authorVineet Gupta <vgupta@synopsys.com>
Thu, 16 Jul 2015 05:01:45 +0000 (10:31 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Tue, 4 Aug 2015 03:56:33 +0000 (09:26 +0530)
commit5dc221b4f9fc9fec58757054ccc9f6f05499106e
treefe829de1c330ae1985d059f4cb58d8a8b3ef7c9d
parent10072c3db30a36aadda6d2061c60281ba437aafb
ARC: LLOCK/SCOND based rwlock

With LLOCK/SCOND, the rwlock counter can be atomically updated w/o need
for a guarding spin lock.

This in turn elides the EXchange instruction based spinning which causes
the cacheline transition to exclusive state and concurrent spinning
across cores would cause the line to keep bouncing around.
LLOCK/SCOND based implementation is superior as spinning on LLOCK keeps
the cacheline in shared state.

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/include/asm/spinlock.h
arch/arc/include/asm/spinlock_types.h