JDK-6888847 : TaskQueue needs release_store() for correctness on RMO machines
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-10-06
  • Updated: 2013-01-26
  • Resolved: 2009-11-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u21Fixed 7Fixed hs17Fixed
Related Reports
Relates :  
Relates :  
Description
Even though the task queues work correctly on TSO machines, it turns out that they are incorrect when ran on non-TSO machines, as they are missing two release_stores.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/2c03ce058f55
08-10-2009

SUGGESTED FIX Thanks to Bob Vandette for the fix.
06-10-2009

SUGGESTED FIX @@ -205,11 +205,11 @@ bool GenericTaskQueue<E>::push_slow(E t, uint dirty_n_elems) { if (dirty_n_elems == N - 1) { // Actually means 0, so do the push. uint localBot = _bottom; _elems[localBot] = t; - _bottom = increment_index(localBot); + OrderAccess::release_store(&_bottom, increment_index(localBot)); return true; } return false; } @@ -483,11 +483,11 @@ idx_t top = _age.top(); uint dirty_n_elems = dirty_size(localBot, top); assert((dirty_n_elems >= 0) && (dirty_n_elems < N), "n_elems out of range."); if (dirty_n_elems < max_elems()) { _elems[localBot] = t; - _bottom = increment_index(localBot); + OrderAccess::release_store(&_bottom, increment_index(localBot)); return true; } else { return push_slow(t, dirty_n_elems); } #endif
06-10-2009

EVALUATION Add release_stores where appropriate.
06-10-2009