Re: [PATCH 6/6] ARCv2: spinlock/rwlock: Reset retry delay when starting a new spin-wait cycle

2015-08-03 Thread Peter Zijlstra
On Mon, Aug 03, 2015 at 02:40:13PM +, Vineet Gupta wrote: > On Monday 03 August 2015 05:14 PM, Peter Zijlstra wrote: > > On Mon, Aug 03, 2015 at 03:33:08PM +0530, Vineet Gupta wrote: > >> > A spin lock could be available momentarily, but the SCOND to actually > >> > acquire it might still fail

Re: [PATCH 6/6] ARCv2: spinlock/rwlock: Reset retry delay when starting a new spin-wait cycle

2015-08-03 Thread Vineet Gupta
On Monday 03 August 2015 05:14 PM, Peter Zijlstra wrote: > On Mon, Aug 03, 2015 at 03:33:08PM +0530, Vineet Gupta wrote: >> > A spin lock could be available momentarily, but the SCOND to actually >> > acquire it might still fail due to concurrent update from other core(s). >> > To elide hardware lo

Re: [PATCH 6/6] ARCv2: spinlock/rwlock: Reset retry delay when starting a new spin-wait cycle

2015-08-03 Thread Peter Zijlstra
On Mon, Aug 03, 2015 at 03:33:08PM +0530, Vineet Gupta wrote: > A spin lock could be available momentarily, but the SCOND to actually > acquire it might still fail due to concurrent update from other core(s). > To elide hardware lock, the sequence is retried after a "delay" which is > increased exp

[PATCH 6/6] ARCv2: spinlock/rwlock: Reset retry delay when starting a new spin-wait cycle

2015-08-03 Thread Vineet Gupta
A spin lock could be available momentarily, but the SCOND to actually acquire it might still fail due to concurrent update from other core(s). To elide hardware lock, the sequence is retried after a "delay" which is increased expoenntially to get a nice backoff behaviour. However, this could cause