JDK-7119908 : G1: Cache CSet start region for each worker for subsequent reuse
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 7u4
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-12-09
  • Updated: 2013-10-04
  • Resolved: 2012-01-20
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 7 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
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
22-03-2012

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

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.
09-12-2011

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.
09-12-2011