RFR (XS): 8165860: workgroup classes are missing volatile qualifiers for lock-free code
mikael.gerdin at oracle.com
Mon Sep 19 13:50:55 UTC 2016
On 2016-09-19 15:48, Erik Österlund wrote:
> Mikael Gerdin noticed a compiler workaround could be done in a
> nicer-looking way.
> So here goes a new webrev. Thanks, Mikael.
> Incremental webrev:
> Full webrev: http://cr.openjdk.java.net/~eosterlund/8165860/webrev.01/
Much better, looks good to me now.
> Tested with JPRT.
> On 2016-09-19 12:28, Erik Österlund wrote:
>> 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.
More information about the hotspot-gc-dev