]> git.baikalelectronics.ru Git - kernel.git/commit
ARCv2: spinlock/rwlock: Reset retry delay when starting a new spin-wait cycle
authorVineet Gupta <vgupta@synopsys.com>
Tue, 21 Jul 2015 15:46:53 +0000 (18:46 +0300)
committerVineet Gupta <vgupta@synopsys.com>
Tue, 4 Aug 2015 03:56:35 +0000 (09:26 +0530)
commit1c5c7aa21c0ff523656b91195290938dea1ac942
tree66f2d999f9f0a140790fc62f50504e2ce659bd01
parentfa956a8268ae7449d64f4f9630a666c54b256e65
ARCv2: spinlock/rwlock: Reset retry delay when starting a new spin-wait cycle

The previous commit for delayed retry of SCOND needs some fine tuning
for spin locks.

The backoff from delayed retry in conjunction with spin looping of lock
itself can potentially cause the delay counter to reach high values.
So to provide fairness to any lock operation, after a lock "seems"
available (i.e. just before first SCOND try0, reset the delay counter
back to starting value of 1

Essentially reset delay to 1 for a new spin-wait-loop-acquire cycle.

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