Re: Fwd: [PATCH] spinlock spin with pause instruction

2016-03-12 Thread Václav Haisman
On 12.3.2016 07:25, Mark Geisert wrote: > Václav Haisman wrote: >> Hi. >> >> I have noticed that Cygwin's spinlock goes into heavy sleeping code >> for each spin. It seems it would be a good idea to actually try to >> spin a bit first. There is this 'pause' instruction which let's the >> CPU make

Re: Fwd: [PATCH] spinlock spin with pause instruction

2016-03-11 Thread Mark Geisert
Václav Haisman wrote: Hi. I have noticed that Cygwin's spinlock goes into heavy sleeping code for each spin. It seems it would be a good idea to actually try to spin a bit first. There is this 'pause' instruction which let's the CPU make such busy loops be less busy. Here is a patch to do this.

Re: [PATCH] spinlock spin with pause instruction

2016-03-11 Thread Corinna Vinschen
On Mar 11 11:28, Václav Haisman wrote: > Hi. > > I have noticed that Cygwin's spinlock goes into heavy sleeping code > for each spin. It seems it would be a good idea to actually try to > spin a bit first. There is this 'pause' instruction which let's the > CPU make such busy loops be less busy.

Fwd: [PATCH] spinlock spin with pause instruction

2016-03-11 Thread Václav Haisman
Hi. I have noticed that Cygwin's spinlock goes into heavy sleeping code for each spin. It seems it would be a good idea to actually try to spin a bit first. There is this 'pause' instruction which let's the CPU make such busy loops be less busy. Here is a patch to do this. -- VH diff --git