RFR (XS): 8165860: workgroup classes are missing volatile qualifiers for lock-free code

Erik Österlund erik.osterlund at oracle.com
Mon Sep 19 15:01:00 UTC 2016


Hi Mikael,

Thanks for the review!

/Erik

On 2016-09-19 15:50, Mikael Gerdin wrote:
> Hi Erik,
>
> On 2016-09-19 15:48, Erik Österlund wrote:
>> Hi,
>>
>> Mikael Gerdin noticed a compiler workaround could be done in a
>> nicer-looking way.
>> So here goes a new webrev. Thanks, Mikael.
>>
>> Incremental webrev:
>> http://cr.openjdk.java.net/~eosterlund/8165860/webrev.00_01/
>> Full webrev: http://cr.openjdk.java.net/~eosterlund/8165860/webrev.01/
>
> Much better, looks good to me now.
> /Mikael
>
>>
>> Tested with JPRT.
>>
>> Thanks,
>> /Erik
>>
>> On 2016-09-19 12:28, Erik Österlund wrote:
>>> Hi,
>>>
>>> This bug is a split out of the larger JDK-8033552 for adding volatile
>>> qualifiers to lock-free code.
>>> The motivation is to make our implementation more robust since these
>>> kind of issues have struck us a few times too many already.
>>>
>>> CR: https://bugs.openjdk.java.net/browse/JDK-8165860
>>> Webrev: http://cr.openjdk.java.net/~eosterlund/8165860/webrev.00/
>>>
>>> This specific CR handles the lack of volatile qualifiers in the
>>> SubTasksDone and SequentialSubTasksDone classes in the workgroup.* 
>>> files.
>>>
>>> SubTasksDone is missing volatile on the _tasks and _threads_completed
>>> fields that are changed concurrently with atomics.
>>> SequentialSubTasksDone is missing volatile on the _n_claimed and
>>> _n_completed fields that are changed concurrently with atomics.
>>>
>>> Testing: JPRT
>>>
>>> I will need a sponsor to push this.
>>>
>>> Thanks,
>>> /Erik
>>



More information about the hotspot-gc-dev mailing list