Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6821693
Votes 0
Synopsis 64-bit TaskQueue capacity still too small
Category hotspot:garbage_collector
Reported Against
Release Fixed hs16(b08), 6u18(b01) (Bug ID:2181940) , 7(b71) (Bug ID:2182197)
State 11-Closed, Unverified, bug
Priority: 2-High
Related Bugs 6787254 , 6821507 , 2174772
Submit Date 24-MAR-2009
Description
The fix for 6787254 intended to increase the capacity of TaskQueues in 64-bit builds by increasing the size of the TaskQueue::Age struct to 64 bits.  A typo prevented the change from taking effect.
Posted Date : 2009-03-25 22:48:28.0
Work Around
N/A
Evaluation
The following code defines the type used for the two member fields of the Age struct:

#ifdef LP64
typedef juint TAG_TYPE;
// for a taskqueue size of 4M
#define LOG_TASKQ_SIZE 22
#else
typedef jushort TAG_TYPE;
// for a taskqueue size of 16K
#define LOG_TASKQ_SIZE 14
#endif

The LP64 should be _LP64.  Because of this typo, the larger data type is never used, so Age remains a 32-bit struct even in the 64-bit VM and the intended increase in task queue size for the 64-bit VM never took effect.
Posted Date : 2009-03-25 22:48:28.0

In addition to the _LP64 typo, there are several places which still access the Age struct as if were always 32-bits wide by dereferencing through an unsigned int* or volatile unsigned int*. The main examples are the get_age() and set_age() methods in TaskQueueSuper, but there are also calls to Atomic::cmpxchg() and asserts that must be updated to use size_t or another appropriate type.
Posted Date : 2009-03-25 22:48:28.0

The Age class should be better encapsulated so that TaskQueue* methods do not access fields directly, but use accessors which have the necessary attributes (e.g., volatile).  Adding a cmpxchg method to Age would simplify TaskQueue* methods and eliminate many of the casts.  Because the Age struct is now even larger in 64-bit builds, the fix for alignment of the Age struct from 6821507 must be done simultaneously.  That turns out to further simplify the code.
Posted Date : 2009-04-07 19:50:26.0

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/3ee342e25e57
Posted Date : 2009-08-06 13:25:04.0

http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/3ee342e25e57
Posted Date : 2009-08-10 05:12:01.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang