United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6957084 simplify TaskQueue overflow handling
JDK-6957084 : simplify TaskQueue overflow handling

Details
Type:
Enhancement
Submit Date:
2010-05-29
Status:
Closed
Updated Date:
2011-04-23
Project Name:
JDK
Resolved Date:
2011-04-23
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs19
Fixed Versions:
hs19 (b04)

Related Reports
Backport:
Backport:
Backport:
Backport:
Relates:
Relates:
Relates:

Sub Tasks

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

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.
                                     
2010-05-29
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.
                                     
2010-07-01
SUGGESTED FIX

See attachment 6957084-taskqueue.zip.
                                     
2010-07-01
EVALUATION

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

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



Hardware and Software, Engineered to Work Together