<div dir="ltr">Hi Sangheon --<div><br></div><div>Does the number of GC workers ever change dynamically within a stop-world GC phase?<div>If not, you might save a little work by just doing the division once when you decide the number of</div><div>workers at the start of the copying phase, and then use that value for the remainder of the copying</div><div>phase of the collection when you know the number of workers won't change. However, that is just a</div><div>nit, I am sure the work involved in calculating the value at each PLAB refill shouldn't typically be a</div><div>big deal either way.</div><div><br></div><div>I might rename the _desired_plab_sz field to clarify that it's the net value, say by calling it</div><div>_desired_net_plab_sz. (Alternatively, you could change the name of the method</div><div>desired_plab_sz(int) to desired_plab_size_for_n_workers(int), but the former seems better,</div><div>since the parameter already signals the intention for the latter.)</div><div><br></div><div>looks good to me otherwise.</div><div>-- ramki (openjdk: ysr)</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 6, 2015 at 2:40 PM, Sangheon Kim <span dir="ltr"><<a href="mailto:sangheon.kim@oracle.com" target="_blank">sangheon.kim@oracle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
Please review this change to determine the desired PLAB size for current gc worker threads.<br>
<br>
Currently we calculate an optimal PLAB size with current number of gc workers.<br>
When the number of workers changes dynamically (-XX:+<u></u>UseDynamicNumberOfGCThreads), the desired PLAB size returned(by desired_plab_sz()) is still tuned to the number of gc workers that has been used previously.<br>
<br>
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.<br>
<br>
CR:<br>
<a href="https://bugs.openjdk.java.net/browse/JDK-8073204" target="_blank">https://bugs.openjdk.java.net/<u></u>browse/JDK-8073204</a><br>
<br>
Webrev:<br>
<a href="http://cr.openjdk.java.net/~sangheki/8073204/webrev.01" target="_blank">http://cr.openjdk.java.net/~<u></u>sangheki/8073204/webrev.01</a><br>
<br>
Test:<br>
JPRT<br>
<br>
Thanks,<br>
Sangheon<br>
</blockquote></div><br></div>