RFR: Disable worker scaling during reference processing in traversal GC
Roman Kennke
rkennke at redhat.com
Sat Aug 4 11:33:07 UTC 2018
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.
However, we really do want ref-proc-worker-scaling.
Roman
More information about the shenandoah-dev
mailing list