United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7119908 G1: Cache CSet start region for each worker for subsequent reuse
7119908 : G1: Cache CSet start region for each worker for subsequent reuse

Details
Type:
Enhancement
Submit Date:
2011-12-09
Status:
Closed
Updated Date:
2012-03-29
Project Name:
JDK
Resolved Date:
2012-01-20
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7u4
Fixed Versions:
hs23

Related Reports
Backport:
Backport:

Sub Tasks

Description
During the code reviews for the changes for 7112743, the observation was made that the routine G1CollectedHeap::start_cset_region_for_worker() calculates a suitable starting heap region (for iterating over the collection set by the worker threads in parallel) by walking a prefix of the collection set. This can penalize some worker threads and delay them from from starting "real work" as they have to walk a longer prefix.

It was suggested that attempt to reduce the overhead in some way.

A possibility, rather than re-calculate the starting region in the collection for each worker, would be to calculate the starting heap region for each worker once (during RSet scanning) and cache that value for subsequent re-use during the complete_marking_in_collection_set() routine or any other subsequent parallel iteration over the collection set.

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/fd2b426c30db
                                     
2012-03-22
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/fd2b426c30db
                                     
2011-12-16
SUGGESTED FIX

During RSet scanning, cache the calculated starting heap region for each worker. Use a stamp mechanism using the number of GCs to ensure validity if the cached heap region. This will avoid ing having to clear the cache.
                                     
2011-12-09
EVALUATION

During RSet scanning, cache the calculated starting heap region for each worker. Use a stamp mechanism using the number of GCs to ensure validity if the cached heap region.
                                     
2011-12-09



Hardware and Software, Engineered to Work Together