RFR(S): 8007036: G1: Too many old regions added to last mixed GC

Vitaly Davidovich vitalyd at gmail.com
Tue Jan 29 00:30:04 UTC 2013

In same file,

1829   // Is the amount of uncollected reclaimable space above
1830   size_t reclaimable_bytes =
1831   double reclaimable_perc = reclaimable_bytes_perc();

1832   double threshold = (double) G1HeapWastePercent;
1833   if (!over_waste_threshold()) {

I think there's going to be some duplicate code running unless compiler
helps out:
1) cset_chooser->remaining_reclaimable_bytes() called above + by
2) reclaimable_bytes_perc() called above + by over_waste_threshold()

Don't know if this is a concern or not but thought I'd mention it.


Sent from my phone
On Jan 28, 2013 5:36 PM, "Vitaly Davidovich" <vitalyd at gmail.com> wrote:

> Hi John,
> In G1CollectorPolicy::calc_min_old_cset_length(), is it possible to get 0
> for G1MixedGCCountTarget? If so, will get div by zero there.
> Thanks
> Sent from my phone
> On Jan 28, 2013 5:01 PM, "John Cuthbertson" <john.cuthbertson at oracle.com>
> wrote:
>> Hi Everyone,
>> Can I have a couple of volunteers look over the changes for this CR? The
>> webrev is at: http://cr.openjdk.java.net/~**johnc/8007036/webrev.0/<http://cr.openjdk.java.net/~johnc/8007036/webrev.0/>
>> Summary:
>> When adding old regions to the collection set we don't take into account
>> whether the old regions added so far take us below the G1HeapWastePercent.
>> As a result we could end up adding (and collecting) many more regions than
>> we needed to. The actual number added was the minimum between the number of
>> candidate regions / G1MixedGCCountTarget and 10% of the heap.
>> Currently the calculation of the reclaimable bytes as a percentage of the
>> uses exact arithmetic. It might make sense, at some point in the future, to
>> use inexact arithmetic (rounding) in the decision on whether to continue
>> mixed GCs and use exact arithmetic when adding regions.
>> As part of this change I've also moved a couple routines from
>> CollectionSetChooser to G1CollectorPolicy. I think they "fit" better in
>> G1CollectorPolicy.
>> Testing:
>> GCOld with tenuring threshold = 1 and a marking threshold = 10.
>> Many thanks to Monica for identifying the issue.
>> Thanks,
>> JohnC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20130128/4400c790/attachment.htm>

More information about the hotspot-gc-dev mailing list