On Sun, 8 Sep 2013, Andi Kleen wrote:
2013-06-13 Andi Kleen
* doc/extend.texi: Dont use __atomic_clear in HLE
example. Fix typo.
>> I would like to to backport this to 4.8. Ok too?
> Ping!
That's documentation only, right?
Okay.
Gerald
Andi Kleen writes:
> On Thu, Jun 20, 2013 at 11:05:15AM -0700, Richard Henderson wrote:
>> On 06/20/2013 06:20 AM, Andi Kleen wrote:
>> > gcc/:
>> > 2013-06-13 Andi Kleen
>> >
>> >* doc/extend.texi: Dont use __atomic_clear in HLE
>> >example. Fix typo.
>>
>> Ok.
>
> I would like to
On Thu, Jun 20, 2013 at 11:05:15AM -0700, Richard Henderson wrote:
> On 06/20/2013 06:20 AM, Andi Kleen wrote:
> > gcc/:
> > 2013-06-13 Andi Kleen
> >
> > * doc/extend.texi: Dont use __atomic_clear in HLE
> > example. Fix typo.
>
> Ok.
I would like to to backport this to 4.8. Ok too?
Andi Kleen writes:
> ...
> /* Free lock with lock elision */
> -__atomic_clear(&lockvar, __ATOMIC_RELEASE|__ATOMIC_HLE_RELEASE);
> +__atomic_store(&lockvar, 0, __ATOMIC_RELEASE|__ATOMIC_HLE_RELEASE);
Sorry I realized it should be actually __atomic_store_n, not __atomic_store.
I will fix that as
On 06/20/2013 06:20 AM, Andi Kleen wrote:
> gcc/:
> 2013-06-13 Andi Kleen
>
> * doc/extend.texi: Dont use __atomic_clear in HLE
> example. Fix typo.
Ok.
r~
From: Andi Kleen
The HLE example in the manual only commits when using bool
for the flag, because __atomic_clear only writes bool, and
HLE requires the acquire and release to match.
So when the example is copied with e.g. an int variable it
does not commit and causes slower than expected perform