RFR (XS) 8212005: Epsilon elastic TLAB sizing may cause misalignment

Aleksey Shipilev shade at redhat.com
Thu Oct 11 10:00:33 UTC 2018


On 10/11/2018 11:48 AM, Per Liden wrote:
> I think you want to make sure that _max_tlab_size also ends up being aligned to MinObjectAlignment
> here:
> 
>   50   _max_tlab_size = MIN2(CollectedHeap::max_tlab_size(), EpsilonMaxTLABSize / HeapWordSize);
> 
> Otherwise you risk allocating a TLAB larger than _max_tlab_size here:
> 
>  214   // Always honor boundaries
>  215   size = MAX2(min_size, MIN2(_max_tlab_size, size));
>  216
>  217   // Always honor alignment
>  218   size = align_up(size, MinObjAlignment);
> 
> Right?

Right. Or this means that EpsilonMaxTLABSize has to be additionally checked for alignment before
use. If EpsilonMaxTLABSize is proper, then size is always aligned too, even if it gets capped by
_max_tlab_size, right?

Unfortunately, I have already pushed the fix, and can follow up on this in a separate RFE.

-Aleksey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20181011/32fdcc5e/signature.asc>


More information about the hotspot-gc-dev mailing list