[concurrency-interest] RFR: 8065804: JEP 171: Clarifications/corrections for fence intrinsics
martinrb at google.com
Thu Nov 27 03:06:13 UTC 2014
On Wed, Nov 26, 2014 at 7:00 PM, David Holmes <davidcholmes at aapt.net.au> wrote:
> Can I make an observation about acquire() and release() - to me they are
> meaningless when considered in isolation. Given their definitions they allow
> anything to move into a region bounded by acquire() and release(), then you
> can effectively move the whole program into the region and thus the
> acquire() and release() do not constrain any reorderings. acquire() and
> release() only make sense when their own movement is constrained with
> respect to something else - such as lock acquisition/release, or when
> combined with specific load/store actions.
David, it seems you are agreeing with my argument below. The
definitions in the hotspot sources should be fixed, in the same sort
of way that I'm trying to make the specs for Unsafe loads clearer and
> Martin Buchholz writes:
>> I think the hotspot docs need to be more precise about when they're
>> talking about movement of stores and when about loads.
>> > // release. I.e., subsequent memory accesses may float above the
>> > // release, but prior ones may not float below it.
>> As I've said elsewhere, the above makes no sense without restricting
>> the type of access.
More information about the core-libs-dev