JDK-8228506 : Remove rs_length_diff related code
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 14
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2019-07-23
  • Updated: 2020-06-03
  • Resolved: 2020-06-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 15
15Resolved
Related Reports
Blocks :  
Duplicate :  
Relates :  
Relates :  
Description
rs_length_diff code is used to predict an error term for the young gen remembered set length (young_rs_length).

The associated predictor (G1Analytics::rs_length_diff_seq) is updated wrongly with information from old gen remembered set sizes at every (mixed) gc.

This means that an error term based on old gen remembered set sizes is applied to something to predict young gen remembered sets.

Also the need for this should be investigated.
Comments
This will be fixed by JDK-8231731, most likely removing this code so closing as dup.
03-06-2020

Probably obsolete after JDK-8231731.
22-11-2019

Further investigation and testing showed that this seems to work as a compensation for (significant) remembered set differences between young and mixed phase. Look if that is still needed after JDK-8231731.
18-11-2019

Currently the rs length diffs are used for two purposes: 1) re-evaluate the prediction of how long the young part of a mixed collection may take at the start of the mixed phase 2) re-evaluate the young gen size during the non-mixed phase (during mixed phase we do not adapt young gen size) (so actually the current sampling work at that time seems useless.) In either cases it is harmful to add old gen remembered set sizes to any value ending up in the predictor. This is only used for predicting young gen remembered set size (for predicting the cost of evacuating they young gen) after all. For old gen regions we already simply use the remembered set sizes directly. There is some justification for doing it for both cases as the rs_length_diffs we sampled may be outdated at the time we recalculate.
25-07-2019

I think one reason for adding old gen remembered sets during mixed gc could be that _max_rs_length in the current code contains a count of all region's remembered set entries. So this CR and JDK-8228505 are potentially the same issue.
25-07-2019

The only idea I have why this code should exist would be accounting for the impact of mixed collections to the subsequent young collections, kind of accounting for the increased number of log buffer cards swapping over into the next collection. Even in that case the calculation seems wrong.
24-07-2019