JDK-6957084 : simplify TaskQueue overflow handling
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs19
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-05-29
  • Updated: 2011-04-23
  • Resolved: 2011-04-23
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
6u21pFixed 7Fixed hs19Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Code that uses TaskQueue to hold stealable tasks has to allow for the fixed-size TaskQueue to overflow.  This is often done using a separate per-thread overflow stack.  Maintaining the TaskQueue and overflow stack separately is tedious and error prone; a TaskQueue with built-in overflow handling is needed.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/b2a00dd3117c
13-07-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/b2a00dd3117c
02-07-2010

EVALUATION Add a TaskQueue subtype with built-in overflow handling, OverflowTaskQueue. Each OverflowTaskQueue includes an overflow stack (GrowableArray) to hold elements that do not fit in the TaskQueue. OverflowTaskQueue::push() will push to the taskqueue first; if that fails, the item is pushed onto the overflow stack. Convert the various TaskQueues and associated overflow stacks used by par scavenge and par compact to instances of OverflowTaskQueue, and remove RegionTaskQueueWithOverflow.
01-07-2010

SUGGESTED FIX See attachment 6957084-taskqueue.zip.
01-07-2010

EVALUATION See Description. A class containing both a TaskQueue and overflow stack, RegionTaskQueueWithOverflow, was added in jdk5; however the interface does not allow easy substitution for existing TaskQueues. A subclass of GenericTaskQueue with a few additional methods for accessing the overflow stack would be simpler to adopt.
29-05-2010