JDK-6921087 : G1: remove per-GC-thread expansion tables from the fine-grain remembered sets
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs17
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-01-28
  • Updated: 2013-09-18
  • Resolved: 2012-07-03
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
7u40Fixed 8Fixed hs24Fixed
Description
In G1, the remembered set (RSet) of a heap region (say R) has three types: sparse, fine, and coarse. Fine-entries are organized in a hash table, with each entry (say E) corresponding to a region that potentially has references into R.

During GC pauses, if an entry E corresponds to a region that's a GC alloc region (i.e., we are copying objects into it), then the entry is "expanded". This means that the entry gets T - 1 extra tables (where T is the number of GC threads). This way, each such table can be updated by a GC thread without any synchronization (as each table can only be updated by only one GC thread). GC thread 0 still updates the "main" entry. At the end of the pause, all the expanded tables are collapsed and the information from them is propagated into the main table.

In the current version of G1, the expanded tables are not heavily used / used at all given that we try to defer the RSet updates (not do them immediately during a pause but defer them to the concurrent refinement threads).

Given that they are not used and add code complexity, it'd be helpful to remove them to simplify the RSet code.

Comments
EVALUATION http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/7994a5a35fcf
26-06-2012

EVALUATION Cleanup changes provided by Thomas Schatzl as a pre-requesite for a change that chains PRTs (used in an RSet's fine grain entries) together into a doubly linked list. During freeing, this allows the PRTs in an RSet to be added to the global free list as a single operation.
19-06-2012