G1 RSet improvement ideas

Igor Veresov igor.veresov at oracle.com
Fri Jan 31 01:52:51 UTC 2014


Regarding item (4). Here is an idea of quickly rebuilding rsets: after creating a new empty set, the cards from the old set can be simply dirtied and pumped into the conc. refinement system. 

igor

On Jan 30, 2014, at 9:33 AM, Tony Printezis <tprintezis at twitter.com> wrote:

> 
> (4) G1 RSets: Filter old RSets before a collection
> 
> Old RSets tend to grow quite large and sometimes they contain a large amount of stale entries that need to be scanned for nothing during a GC. After concurrent marking has completed, but maybe before each mixed GC, we could introduce a concurrent process that scans RSets of regions that will be collected and filters out any stale entries (by scanning the cards that the RSet points to and removing any cards that don't point to the region any more). This should reduce the amount of RSet scanning work that's done during mixed GCs.
> 
> The easiest way to do this, to avoid any nasty races / MT issues, is to give each old region a new RSet (during a safepoint, say), store the old one somewhere, scan it (concurrently), and add any entries that need to be retained to the new one. At the end, we can just reclaim the old one. This way, any new updates to the new RSet will automatically happen through the normal path. Explicitly removing an entry, instead of recreating the RSet as described, will be much harder, given that we'd have to synchronize with other threads potentially trying to add the same entry.
> 
> This can be done in addition to (2). In fact, the two operations could also be combined (i.e. combined old region group's RSets and also filter them at the same time).
> 




More information about the hotspot-gc-dev mailing list