RFR(xs): 8152120: TLAB compute_size() should not allow any size larger than max_size (original) (raw)
Jon Masamitsu jon.masamitsu at oracle.com
Fri Mar 18 18:55:21 UTC 2016
- Previous message (by thread): RFR(xs): 8152120: TLAB compute_size() should not allow any size larger than max_size
- Next message (by thread): RFR(xs): 8152120: TLAB compute_size() should not allow any size larger than max_size
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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::computesize() usually returns a value of 'desiredsize() + aligned object size'. When ThreadLocalAllocBuffer::desiredsize() 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::maxsize(). 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 desiredsize() we limit not to exceed maxsize() but computesize() is using 'desiredsize() + alignedobjsize'. Thanks, Sangheon
Thanks, Stefan Testing: JPRT Thanks, Sangheon
- Previous message (by thread): RFR(xs): 8152120: TLAB compute_size() should not allow any size larger than max_size
- Next message (by thread): RFR(xs): 8152120: TLAB compute_size() should not allow any size larger than max_size
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]