RFR: 8228657: ZGC: ZObjectAllocator::used() should take undone allocations into account
Per Liden
per.liden at oracle.com
Tue Jul 30 14:38:19 UTC 2019
Thanks Erik!
/Per
On 7/29/19 2:28 PM, Erik Österlund wrote:
> Hi Per,
>
> Looks good.
>
> Thanks,
> /Erik
>
> On 2019-07-26 15:11, Per Liden wrote:
>> In ZObjectAllocator, when we allocate a page we increment _used.
>> However, we might later undo that page allocation, but we then leave
>> _used as is. This results in a sometimes slightly incorrect value
>> being reported by ZCollectedHeap::tlab_used(), which is fed into the
>> TLAB heuristics. This incorrectness is not that big of a deal, but we
>> should still fix this.
>>
>> We can't safely decrement _used (because we might be executing on a
>> different CPU now), but we can track the amount of undos we've done,
>> and later subtract that from _used.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8228657
>> Webrev: http://cr.openjdk.java.net/~pliden/8228657/webrev.0
>>
>> /Per
>
More information about the hotspot-gc-dev
mailing list