Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8260704

ParallelGC: oldgen expansion needs release-store for _end

XMLWordPrintable

    • gc
    • b35

        JDK-8257999 added a storestore barrier in PSOldGen expansion, to ensure the update of other data structures was complete before the update of MutableSpace::_end made the additional space available to other threads for allocation.

        Unfortunately, that's the wrong place for the ordering barrier. It ensures the stores done by MutableSpace::initialize (including the update of _end) follow the other data structure updates in PSOldGen, but there are also writes within MS::initialize that must preceed the update of _end. In particular, when AlwaysPreTouch, the writes done for pretouching are presently unordered wrto the write of _end. Another thread could see the new _end value and allocate and start using that newly available space, only to have pretouch writes scribble on it.

        A barrier is needed to ensure the write to _end is really last.

              kbarrett Kim Barrett
              kbarrett Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: