RFR (M): 8165857: CMS _overflow_list is missing volatile qualifiers

Kim Barrett kim.barrett at oracle.com
Mon Sep 19 15:06:44 UTC 2016

> On Sep 19, 2016, at 7:43 AM, Erik Österlund <erik.osterlund at oracle.com> 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-8165857
> Webrev: http://cr.openjdk.java.net/~eosterlund/8165857/webrev.00/

We’re likely to have merge conflicts between this and my changes for JDK-8166229.
I’ve taken a quick look (haven’t reviewed yet; probably later today) and I think they’ll all be straightforward “keep both” conflicts.

> This specific CR handles the lack of volatile qualifiers for the _overflow_list fields of the ParallelGC ConcurrentMarkSweepGeneration and ParNewGeneration classes.
> The type of the overflow list has been changed to HeapWord *volatile per Kim's recommendation as an oop variant requires changes to the oop class with new overloads, which seems a bit unnecessary considering the overflow lists are hardly proper oop lists either; it has e.g. sentinel values.
> I went ahead and did the required changes to make the lists HeapWord *volatile, which should make them a little bit more robust.
> Testing: JPRT

My testing of JDK-8166229 indicates the code path here is hard to reach with normal testing.
See the set of options I used in the RFR for that fix.

> I will need a sponsor to push this.

I’ll sponsor this.

More information about the hotspot-gc-dev mailing list