RFR: Avoid false sharing by padding the ShenandoahEvacOOMHandler field in ShenandoahHeap

Zhengyu Gu zgu at redhat.com
Sat Oct 20 23:13:42 UTC 2018



On 10/19/2018 06:17 PM, Aleksey Shipilev wrote:
> On 10/19/2018 11:56 PM, Aleksey Shipilev wrote:
>> On 10/19/2018 09:28 PM, Roman Kennke wrote:
>>> The changeset "Sort ShenandoahHeap methods/fields into logical groups"
>>> from Sept 21 reordered fields in ShenandoahHeap. Oddly, this has caused
>>> a *severe* regression in Traversal GC (and presumably less severe with
>>> adaptive) that caused throughput to drop by about 1/3. The reason for
>>> this seems to be false sharing. Padding the evac_oom_handler field fixes it:
>>>
>>> http://cr.openjdk.java.net/~rkennke/evac-oom-false-sharing/webrev.00/
> 
> DEFAULT_CACHE_LINE_SIZE/2 is wrong, by the way; it needs to be just DEFAULT_CACHE_LINE_SIZE. I think
> you have copy-pasted it from globalCounter.hpp, but that code is too optimistic. Copy-paste from
> shenandoahSharedVariables.hpp.

Cause DEFAULT_CACHE_LINE_SIZE is actually 2 * cacheline size?

-Zhengyu

> 
> -Aleksey
> 


More information about the shenandoah-dev mailing list