RFR(xs): 8152120: TLAB compute_size() should not allow any size larger than max_size

sangheon sangheon.kim at oracle.com
Fri Mar 18 19:01:21 UTC 2016


Thanks, Jon.

Sangheon


On 03/18/2016 11:55 AM, Jon Masamitsu wrote:
>
>
> On 3/18/2016 10:33 AM, sangheon wrote:
>> Hi Stefan,
>>
>> Thanks for reviewing this.
>>
>> On 03/18/2016 02:30 AM, Stefan Johansson wrote:
>>> Hi Sangheon,
>>>
>>> On 2016-03-18 06:50, sangheon wrote:
>>>> Hi all,
>>>>
>>>> Could I have a couple of reviews for this change to limit new TLAB 
>>>> size?
>>>>
>>>> ThreadLocalAllocBuffer::compute_size() usually returns a value of 
>>>> 'desired_size() + aligned object size'.
>>>> When ThreadLocalAllocBuffer::desired_size() reaches to the TLAB max 
>>>> size, we don't limit this value to be less than or equal to TLAB 
>>>> max size.
>>>>
>>>> This change is proposing to limit to 
>>>> ThreadLocalAllocBuffer::max_size().
>>>>
>>>> CR: https://bugs.openjdk.java.net/browse/JDK-8152120
>>>> Webrev: http://cr.openjdk.java.net/~sangheki/8152120/webrev.00
>>> Looks good, but there is a MIN3() function that you could use if you 
>>> like.
>> Okay, I will use that.
>>
>> Webrev: http://cr.openjdk.java.net/~sangheki/8152120/webrev.01
>
> Looks good.
>
> Jon
>>
>>>
>>> Just out of curiosity, is this something you have seen a lot and if 
>>> so for which collectors?
>> No, usually this doesn't happen.
>> I found this issue with ParallelGC when I investigated JDK-8151708: 
>> SIGSEGV with MinTLABSize=4294967296 on Sparcv9.
>> If we have really large MinTLABSize(and/or large related flags), this 
>> problem would happen for all collectors in theory. Because when we 
>> calculate desired_size() we limit not to exceed max_size() but 
>> compute_size() is using 'desired_size() + aligned_obj_size'.
>>
>> Thanks,
>> Sangheon
>>
>>
>>>
>>> Thanks,
>>> Stefan
>>>
>>>> Testing: JPRT
>>>>
>>>> Thanks,
>>>> Sangheon
>>>
>>
>




More information about the hotspot-gc-dev mailing list