RFR: 8186838: Generalize Atomic::inc/dec with templates
Erik Österlund
erik.osterlund at oracle.com
Fri Sep 8 08:13:21 UTC 2017
Hi Andrew,
On 2017-09-08 09:13, Andrew Haley wrote:
> On 06/09/17 15:13, Erik Österlund wrote:
>> Hi Andrew,
>>
>> On 2017-09-06 15:20, Andrew Haley wrote:
>>> On 05/09/17 09:04, Erik Österlund wrote:
>>>
>>>> For example, our atomics typically conservatively guarantees
>>>> bidirectional full fencing, while theirs does not.
>>> Firstly, we can insert whatever fences we want, using intrinsics. We
>>> don't need assembly language to do that.
>> Since I thought we already had (and finished) that discussion, and it is
>> no longer relevant to the current proposal of removing inc/dec
>> specializations, I hope you are okay with me preferring not to re-open
>> that discussion in this RFE. Another day, perhaps?
> Well, let us make a deal: if you don't say something I disagree with, I promise
> not to disagree. :-)
We have a deal! :)
>>> Secondly, I don't see bidirectional full fencing in x86 atomics, and I
>>> don't think we really want bidirectional full fencing anyway.
>> That is because an atomic x86 locked instruction is observably
>> equivalent to having bidirectional fencing surrounding the access due to
>> the stronger memory model of the machine.
> TSO, as implemented by x86, is very strong, but is it really equivalent to
> bidirectional fencing?
Yup.
Thanks,
/Erik
More information about the hotspot-dev
mailing list