RFR: Elide Evac-OOM protocol when enqueuing string deduplication candidates in traversal GC

Zhengyu Gu zgu at redhat.com
Mon Mar 19 18:33:03 UTC 2018


On 03/19/2018 02:04 PM, Roman Kennke wrote:
> This seems slightly racy because it depends on GC not being cancelled, > which might well flip over once we reach enqueue_candidate().

I don't think so, but maybe miss something, so poke holes :-)

There are three scenarios:

1) Cancelled by early evacuation failure by this thread, successfully 
set the flag, it should be visible.

2) Early evacuation failed, but flag was set by other thread - 
Atomic::cmpxchg() in flag->try_set() should make it visible to this thread.

3) Successfully evacuated, concelled_concgc flag set by other thread - 
it does not matter if it is visible or not.

Thanks,

-Zhengyu

> 
> 
>> Entering evac-oom protocol everytime to enqueuing a string deduplication
>> candidate in traversal GC, has high cost. SpecJVM XmlTransform benchmark
>> score was -10.5% worse than no deduplication, comparing to about -4.8%
>> with adaptive GC.
>>
>> We can avoid evac-oom protocol by ensuring that candidates are always
>> to-space oops. With following patch, the scores are inline with adaptive
>> GC.
>>
>>
>> Webrev:
>> http://cr.openjdk.java.net/~zgu/shenandoah/traversal-dedup-elide-evac-oom/webrev.00/
>>
>>
>> Test:
>>
>>    hotspot_gc_shenandoah (fastdebug and release)
>>
>>
>> Thanks,
>>
>> -Zhengyu
> 
> 


More information about the shenandoah-dev mailing list