As part of his code review comments for 6818542, Ramki suggested the following:
One improvement that could be made (but which predates any of these changes) is that the ParGCAllocBuffer's min_size() and max_size() just return the lower and upper bounds set for TLAB's. Rather these should be set (perhaps statically if that is possible) by the containing heap or generation.
The PLAB sizing calculation already does the requisite clipping, so if the min and max sizes were properly configured you would likely not need to do the clipping from
above that you now have to do to keep G1's ergonomic PLAB sizes from becoming humongous.
Communicating the min and max bounds for the heap/generation to the PLAB stats instance(s) is a great idea. As Ramki says - it means that we can do away with any extra clipping of the value returned by desired_plab_sz(). It will be un-necessary as the value will already have been clipped by the PLABStats instance.
One improvement that could be made (but which predates any of these changes) is that the ParGCAllocBuffer's min_size() and max_size() just return the lower and upper bounds set for TLAB's. Rather these should be set (perhaps statically if that is possible) by the containing heap or generation.
The PLAB sizing calculation already does the requisite clipping, so if the min and max sizes were properly configured you would likely not need to do the clipping from
above that you now have to do to keep G1's ergonomic PLAB sizes from becoming humongous.
Communicating the min and max bounds for the heap/generation to the PLAB stats instance(s) is a great idea. As Ramki says - it means that we can do away with any extra clipping of the value returned by desired_plab_sz(). It will be un-necessary as the value will already have been clipped by the PLABStats instance.
- duplicates
-
JDK-8030177 G1: Enable TLAB resizing
- Resolved