On Wed, Apr 20, 2016 at 12:39:45 -0700, Richard Henderson wrote:
> On 04/20/2016 11:11 AM, Emilio G. Cota wrote:
> >On Wed, Apr 20, 2016 at 10:55:45 -0700, Richard Henderson wrote:
> >>On 04/20/2016 10:17 AM, Emilio G. Cota wrote:
(snip)
> >My comment was related to this:
> >
> >>[...] do note that
On 04/20/2016 11:11 AM, Emilio G. Cota wrote:
On Wed, Apr 20, 2016 at 10:55:45 -0700, Richard Henderson wrote:
On 04/20/2016 10:17 AM, Emilio G. Cota wrote:
I've tried to find a GCC intrinsic for test-and-set, and I've only found
lock_test_and_set, which is what we use for atomic_xchg (except o
On Wed, Apr 20, 2016 at 10:55:45 -0700, Richard Henderson wrote:
> On 04/20/2016 10:17 AM, Emilio G. Cota wrote:
> >I've tried to find a GCC intrinsic for test-and-set, and I've only found
> >lock_test_and_set, which is what we use for atomic_xchg (except on ppc)
> >because it really is an atomic e
On 04/20/2016 10:17 AM, Emilio G. Cota wrote:
I've tried to find a GCC intrinsic for test-and-set, and I've only found
lock_test_and_set, which is what we use for atomic_xchg (except on ppc)
because it really is an atomic exchange:
"This builtin, as described by Intel, is not a traditional test
On Wed, Apr 20, 2016 at 08:18:56 -0700, Richard Henderson wrote:
> On 04/19/2016 04:07 PM, Emilio G. Cota wrote:
> >From: Guillaume Delbergue
> >
> >Signed-off-by: Guillaume Delbergue
> >[Rewritten. - Paolo]
> >Signed-off-by: Paolo Bonzini
> >[Emilio's additions: call cpu_relax() while spinning;
On 04/19/2016 04:07 PM, Emilio G. Cota wrote:
From: Guillaume Delbergue
Signed-off-by: Guillaume Delbergue
[Rewritten. - Paolo]
Signed-off-by: Paolo Bonzini
[Emilio's additions: call cpu_relax() while spinning; optimize for
uncontended locks by acquiring the lock with xchg+test instead of
From: Guillaume Delbergue
Signed-off-by: Guillaume Delbergue
[Rewritten. - Paolo]
Signed-off-by: Paolo Bonzini
[Emilio's additions: call cpu_relax() while spinning; optimize for
uncontended locks by acquiring the lock with xchg+test instead of
test+xchg+test.]
Signed-off-by: Emilio G. Cota
-