RFR (S): 8073204: Determining the desired PLAB size adjusts to the the number of threads at the wrong place
jesper.wilhelmsson at oracle.com
Wed Apr 8 19:57:38 UTC 2015
Looks good in general. Just minor comments:
+ // Assume to have 1 gc worker thread
+ size_t recent_plab_sz = used / (target_refills * 1);
I don't see the point of keeping the "* 1" here, or the parenthesis. The comment
already says that we assume one thread. I think the comment should say "Assumed
to have" or "We assume that we have".
Since you were discussing naming with Ramki I'll add that I don't see the point
in saving two characters by shortening size to sz. I'd prefer if size was
spelled out throughout the code. That may be too much to change in this patch,
but if you decide to change the name anyway please consider this as well.
Sangheon Kim skrev den 6/4/15 23:40:
> Hi all,
> Please review this change to determine the desired PLAB size for current gc
> worker threads.
> Currently we calculate an optimal PLAB size with current number of gc workers.
> When the number of workers changes dynamically
> (-XX:+UseDynamicNumberOfGCThreads), the desired PLAB size returned(by
> desired_plab_sz()) is still tuned to the number of gc workers that has been used
> This change is first calculate the desired PLAB value for a single gc worker and
> then return desired PLAB size according to the current number of threads.
More information about the hotspot-gc-dev