On 4/29/20 1:54 PM, Florian Weimer via Gcc wrote:
> * Kyrylo Tkachov:
>
>> Hi Florian,
>>>
>>> Distributions are receiving requests to build things with
>>> -moutline-atomics:
>>>
>>>   <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=956418>
>>>
>>> Should this be reflected in the GCC upstream defaults for ARMv8-A
>>> generic tuning?  It does not make much sense to me if every distribution
>>> has to overide these flags, either in their build system or by patching
>>> GCC.
>>
>> I don't think this is a "tuning" decision as such, it is a useful
>> feature for deploying LSE in a backwards-compatible manner.
>
> To me, the Debian bug report suggests that it's closer to a workaround
> for a silicon quirk on some platforms.  The performance impact of not
> using LSE on these platforms seems that severe unfortuantely.  That's
> why I thought it might be appropriate for generic tuning.

Yeah, it's gotta be a quirk of some kind. In Java we prefer LSE if
it's there, but there's no way that LDX/STX should be far more
expensive than atomic CAS.  It may well be that on N1 an LDX
followed quickly by an STX fails frequently under high contention,
which it really should not do.

It looks like the sample code provided is fantastically highly-
contended, which is IMVHO a perverse thing to optimize for.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

Reply via email to