[concurrency-interest] Unsynchronized lazy conditions

Alex Otenko oleksandr.otenko at gmail.com
Thu May 31 06:43:17 EDT 2018


Ah, yes, I see the point. Volatile load would cause other loads to also occur, and not reorderable.

Alex

> On 31 May 2018, at 11:37, Aleksey Shipilev <shade at redhat.com> wrote:
> 
> On 05/31/2018 12:32 PM, Alex Otenko wrote:
>>>> (VH.get cannot be different from volatile load on x86, can it?..)
>>> 
>>> Of course it can,
>> 
>> By what means? If VH.get guarantees observing cache-coherent value, how can it do that observing
>> faster than volatile load on x86?
> 
> Because there is more to the performance story than just observing the values. For example, having
> the non-volatile access on fast-path means you can optimize the code around it better. What makes
> VarHandles magical is that we can make the decision on what memory semantics we want for each
> particular use. (Pretty like the internal-jdk-class-that-must-not-be-named).
> 
> -Aleksey
> 



More information about the Concurrency-interest mailing list