RFR (S): 8073204: Determining the desired PLAB size adjusts to the the number of threads at the wrong place
sangheon.kim at oracle.com
Mon Apr 6 23:16:17 UTC 2015
Thank you for reviewing this.
On 04/06/2015 03:40 PM, Srinivas Ramakrishna wrote:
> Hi Sangheon --
> Does the number of GC workers ever change dynamically within a
> stop-world GC phase?
> If not, you might save a little work by just doing the division once
> when you decide the number of
> workers at the start of the copying phase, and then use that value for
> the remainder of the copying
> phase of the collection when you know the number of workers won't
> change. However, that is just a
> nit, I am sure the work involved in calculating the value at each PLAB
> refill shouldn't typically be a
> big deal either way.
Right. I was also considered about using the calculated size for same
workers, but as it's not a big deal I ended up to calculate every time.
> I might rename the _desired_plab_sz field to clarify that it's the net
> value, say by calling it
> _desired_net_plab_sz. (Alternatively, you could change the name of the
> desired_plab_sz(int) to desired_plab_size_for_n_workers(int), but the
> former seems better,
> since the parameter already signals the intention for the latter.)
I will change the field name to '_desired_net_plat_sz'.
> looks good to me otherwise.
> -- ramki (openjdk: ysr)
> On Mon, Apr 6, 2015 at 2:40 PM, Sangheon Kim <sangheon.kim at oracle.com
> <mailto:sangheon.kim at oracle.com>> wrote:
> 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 previously.
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-gc-dev