Request for sponsor - JDK-8031538
Thomas Schatzl
thomas.schatzl at oracle.com
Tue Mar 3 10:06:14 UTC 2015
Hi Staffan,
On Mon, 2015-03-02 at 15:42 -0800, Staffan Friberg wrote:
> Found this old thread lying around.
>
> How about the following patch?
>
> Checking the calculate_young_list_desired_min_length which simply just
> adds the base_min_length I think changing the base_min_length to contain
> more than survivors might increase the nursery size unexpectedly. This
> will keep the calculation the same, while still making sure we can't set
> the young size below what the it currently is.
>
> @@ -538,13 +538,13 @@
> // This is how many young regions we already have (currently: the
> survivors).
> uint base_min_length = recorded_survivor_regions();
> // This is the absolute minimum young length, which ensures that we
> - // can allocate one eden region in the worst-case.
> - uint absolute_min_length = base_min_length + 1;
> + // will at least have one eden region available in the young list.
> + // If we shrink the young list target it won't shrink below the
> current size.
> + uint eden_length = _g1->young_list()->length() -
> recorded_survivor_regions();
> + uint absolute_min_length = base_min_length + (eden_length == 0) ? 1 :
> eden_length;
> uint desired_min_length =
> calculate_young_list_desired_min_length(base_min_length);
> - if (desired_min_length < absolute_min_length) {
> - desired_min_length = absolute_min_length;
> - }
> + desired_min_length = MAX2(desired_min_length, absolute_min_length);
>
> // Calculate the absolute and desired max bounds.
looks good; I applied some minor refactoring (the eden length
calculation moved to the YoungList class). If you are good with these
changes, I can sponsor it.
Webrev: http://cr.openjdk.java.net/~tschatzl/8031538/webrev/
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list