Re: [GIT PULL v2 1/5] processor.h: introduce cpu_relax_yield

2016-11-21 Thread Russell King - ARM Linux
On Tue, Nov 15, 2016 at 02:19:53PM +0100, Christian Borntraeger wrote: > On 11/15/2016 01:30 PM, Russell King - ARM Linux wrote: > > On Tue, Oct 25, 2016 at 11:03:11AM +0200, Christian Borntraeger wrote: > >> For spinning loops people do often use barrier() or cpu_relax(). > >> For most architectur

Re: [GIT PULL v2 1/5] processor.h: introduce cpu_relax_yield

2016-11-21 Thread Russell King - ARM Linux
On Tue, Oct 25, 2016 at 11:03:11AM +0200, Christian Borntraeger wrote: > For spinning loops people do often use barrier() or cpu_relax(). > For most architectures cpu_relax and barrier are the same, but on > some architectures cpu_relax can add some latency. > For example on power,sparc64 and arc,

Re: [GIT PULL v2 1/5] processor.h: introduce cpu_relax_yield

2016-11-15 Thread Christian Borntraeger
On 11/15/2016 02:37 PM, Russell King - ARM Linux wrote: > On Tue, Nov 15, 2016 at 02:19:53PM +0100, Christian Borntraeger wrote: >> On 11/15/2016 01:30 PM, Russell King - ARM Linux wrote: >>> On Tue, Oct 25, 2016 at 11:03:11AM +0200, Christian Borntraeger wrote: For spinning loops people do of

Re: [GIT PULL v2 1/5] processor.h: introduce cpu_relax_yield

2016-11-15 Thread Christian Borntraeger
On 11/15/2016 01:30 PM, Russell King - ARM Linux wrote: > On Tue, Oct 25, 2016 at 11:03:11AM +0200, Christian Borntraeger wrote: >> For spinning loops people do often use barrier() or cpu_relax(). >> For most architectures cpu_relax and barrier are the same, but on >> some architectures cpu_relax c

[GIT PULL v2 1/5] processor.h: introduce cpu_relax_yield

2016-10-25 Thread Christian Borntraeger
For spinning loops people do often use barrier() or cpu_relax(). For most architectures cpu_relax and barrier are the same, but on some architectures cpu_relax can add some latency. For example on power,sparc64 and arc, cpu_relax can shift the CPU towards other hardware threads in an SMT environmen