summaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2015-07-14 17:55:05 +0530
committerVineet Gupta <vgupta@synopsys.com>2015-08-04 09:26:33 +0530
commitae7eae9e031206bde8645d038c76ad89e7d3fbcb (patch)
tree15e37fb62b3f2467148367e7fa73a1d7147e1d17 /arch/arc/kernel
parent8ac0665fb6ff125efc4df08772317f7311a95ce5 (diff)
downloadtalos-obmc-linux-ae7eae9e031206bde8645d038c76ad89e7d3fbcb.tar.gz
talos-obmc-linux-ae7eae9e031206bde8645d038c76ad89e7d3fbcb.zip
ARC: LLOCK/SCOND based spin_lock
Current spin_lock uses EXchange instruction to implement the atomic test and set of lock location (reads orig value and ST 1). This however forces the cacheline into exclusive state (because of the ST) and concurrent loops in multiple cores will bounce the line around between cores. Instead, use LLOCK/SCOND to implement the atomic test and set which is better as line is in shared state while lock is spinning on LLOCK The real motivation of this change however is to make way for future changes in atomics to implement delayed retry (with backoff). Initial experiment with delayed retry in atomics combined with orig EX based spinlock was a total disaster (broke even LMBench) as struct sock has a cache line sharing an atomic_t and spinlock. The tight spinning on lock, caused the atomic retry to keep backing off such that it would never finish. Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud