RFR (S): 8073204: Determining the desired PLAB size adjusts to the the number of threads at the wrong place
sangheon.kim at oracle.com
Wed Apr 8 20:28:29 UTC 2015
Thank you for the review.
On 04/08/2015 12:57 PM, Jesper Wilhelmsson wrote:
> Hi Sangheon,
> Looks good in general. Just minor comments:
> In parGCAllocBuffer.cpp
> + // 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".
Okay, I will fix this.
> 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.
Yes. Thomas and I discussed from other email about changing name. But as
you said, it's too much to cover within this CR so I would prefer to
separate to another CR.
> 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
>> 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
More information about the hotspot-gc-dev