RFR: Disable worker scaling during reference processing in traversal GC

Zhengyu Gu zgu at redhat.com
Sat Aug 4 12:03:41 UTC 2018



On 08/04/2018 07:33 AM, Roman Kennke wrote:
> Am 04.08.2018 um 13:09 schrieb Roman Kennke:
>>> This is not an optimal fix, but we need it to avoid hanging problem with
>>> traversal GC.
>>>
>>> Currently, we have an EvacOOMScope to guard against possible
>>> single-threaded reference processing. Unfortunately, if the processing
>>> is multiple-threaded (by workers)this scope can prevent evac-oom from
>>> progressing.
>>> For example, if a worker encounters evac-oom, it will stuck in
>>> wait_for_no_evac_threads() method, caused by this additional scope,
>>> which prevents worker's termination, that keeps above evac-oom scope alive.
>>>
>>> This (probably temporary) fix is to disable worker scaling, and only
>>> enables single-threaded evac-oom scope if reference processing is
>>> actually single-threaded.
>>
>> Disabling worker-scaling seems bad.
>>
>> A better fix would be to execute 1-threaded processing in a single
>> worker instead of the VMThread. Maybe we can change RP to (optionally)
>> do that? It would also simplify the code by avoiding special cases 1 vs.
>> multi-threading.
>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~zgu/shenandoah/disable_rp_processing_worker_scale/webrev.00/
>>
>> Please push this (hangs are less acceptable than suboptimal code), but
>> also please work on a better fix.
>>
> 
> In fact, the proposed fix will disable ref-proc-scaling in a rather
> crude way. It will then always use all workers to process references. An
> easier workaround with same effect would be to pass false as last
> argument to ReferenceProcessor constructor to begin with.

That will disable scaling for other GCs, which do not suffer from this 
problem.

I will be offline soon, preparing for the trip. If you need the patch, 
please push, or we can discuss it next week.

Thanks,

-Zhengyu

> 
> However, we really do want ref-proc-worker-scaling.
> 
> Roman
> 


More information about the shenandoah-dev mailing list