RFR: Implement protocol for safe OOM during evacuation handling
Zhengyu Gu
zgu at redhat.com
Mon Mar 5 16:20:26 UTC 2018
>>> I don't think so. After the protocol is done, it will keep up the
>>> OOM_MARKER_MASK until it's cleared during safepoint. This is checked
>>> upon entry of the protocol, and does a fast-path-return after setting up
>>> the flags to return with RB.
>>>
>>> If it happens to enter repeatedly while the protocol is in progress, it
>>> will participate in it as normal, e.g. will be blocked to enter until
>>> the protocol is done, and then observe the OOM_MARKER_MASK and return
>>> with RB as above.
>>>
>>> It must be ok to enter into the protocol repeatedly without race. If you
>>> find a race please describe it to me.
>>>
>> What I described above, is an example, no?
>>
>> L#491 drops counter to 0, so WB exit.
>> L#492 fails to terminate, re-enters protocol. However, there is no check
>> if OOM protocol is in progress, then goes to L#484, and find some thing ...
>
> There is a check upon (re-)entry:
>
> https://paste.fedoraproject.org/paste/dVol6OSw8S37dH5RBNztMQ
>
> Which means it raises the TL-flag again in wait_for_no_evac_flag() and
> thus cause any encapsulated call to evac_obj() to return with RB. The
> actual wait loop will not be entered again if the protocol was already done.
Okay, I missed flag checking in evac_obj.
Thanks,
-Zhengyu
>
> *If* this happens while the protocol is started or in-progress, it will
> do the usual CAS counting, which should prevent races.
>
>
>
More information about the shenandoah-dev
mailing list