RFR (XS): 8138684: G1 decision about taking regions into the collection set is too aggressive
Thomas Schatzl
thomas.schatzl at oracle.com
Fri Nov 13 08:30:40 UTC 2015
Hi Jon,
On Thu, 2015-11-12 at 11:41 -0800, Jon Masamitsu wrote:
>
> On 11/05/2015 02:49 AM, Thomas Schatzl wrote:
> > Hi all,
> >
[...]
> > So I thought of a formula that better represents the assumptions in the
> > GC code, and came up with this:
> >
> > 487 double safety_factor = (100.0 / G1ConfidencePercent) * (100 +
> > TargetPLABWastePct) / 100.0;
> > 488 size_t expected_bytes_to_copy = safety_factor * bytes_to_copy;
> > 489
> > 490 if (expected_bytes_to_copy > free_bytes) {
>
> Thomas,
>
> Change looks good.
Thanks for the review.
>
> I would add a comment before the calculation of the safety factor.
>
> // (100.0 / G1ConfidencePercent) represents a scale factor that
> // allows a more conservative calculation of the expected bytes
> // (i.e., a larger number expected bytes because there is always
> // uncertainty in predictions).
> // (100 + TargetPLABWastePct) / 100.0 represents the increase
> // in expected bytes due to anticipated waste in the PLAB's due
> // to unused space at the end of the evacuation.
>
> If you find those accurate and helpful.
I changed the comments to describe the factors.
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list