RFR (S): 8227719: G1 pending cards estimation too conservative for cost prediction
Thomas Schatzl
thomas.schatzl at oracle.com
Thu Jul 18 20:33:05 UTC 2019
Hi Kim,
On Thu, 2019-07-18 at 15:43 -0400, Kim Barrett wrote:
> > On Jul 18, 2019, at 10:26 AM, Thomas Schatzl <
> > thomas.schatzl at oracle.com> wrote:
> >
> > Hi all,
> >
> > can I have reviews for this change that instead of using a very
> > conservative estimate of the number of pending cards in the DCQS,
> > that is assuming that all completed buffers are full, simply
> > calculates it as buffers are completed, i.e. giving the exact
> > value.
>
> Before I review this, I have a high-level comment that strongly
> affects this.
>
> I suspect that we don't really want the number of buffers at all, but
> only the number of cards. I think the number of buffers is just
> being used to estimate the number of cards. Rather than adding a
> second counter, perhaps consider replacement of one by the other?
I did not look at whether there are other interesting uses for the
number of buffers, but I will look at this tomorrow.
Without looking, I guess that the refinement thread activation needs
the amount of buffers too?
> DirtyCardQueueSet::completed_buffers_num() could be retained (at
> least for now) as an estimate based on the card count. That would
> probably simplify the replacement effort.
>
Sure it does not make sense to carry around a value that is effectively
not used anywhere.
Do you have an idea how this would affect refinement thread activation?
It will likely to be less aggressive then.
Could we base refinement thread activation on the entry count instead
then? If so, this seems to be a change that is better made separately
though. Not against doing this myselves, but it just seems a change big
enough that would imho warrant a separate investigation.
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list