RFR: 8191471: Elastic TLABs for G1
thomas.schatzl at oracle.com
Mon Apr 23 14:08:40 UTC 2018
On Mon, 2018-04-23 at 14:57 +0200, Stefan Johansson wrote:
> Please review these changes to lower the waste in G1 mutator regions.
> JBS: https://bugs.openjdk.java.net/browse/JDK-8191471
> Webrev: http://cr.openjdk.java.net/~sjohanss/8191471/00/
> G1 might waste excessive amount of memory due to allocations that
> would span region boundaries. To lower this waste this patch
> addresses this problem in two ways. TLAB allocations are now more
> flexible allowing the size to be less then the desired amount as long
> as the allocation will fit in the TLAB (defined by min_word_size in
> the call).
> The G1 allocation code also tries to minimize the waste by keeping
> two active allocation regions so that a single large allocation won't
> cause waste that could have been used for other allocations.
some minor nits:
- I would prefer that allocate_new_tlab() returned zero in
actual_word_size if the allocation failed. It does not in any
- g1CollectedHeap.hpp:444: superfluous newline
- collectedHeap.hpp:132: "filled out" -> "returned"
Seems good otherwise.
More information about the hotspot-gc-dev