RFR(S) 8223951: Shenandoah: Only need to update thread roots during final update refs

Roman Kennke rkennke at redhat.com
Fri May 17 14:55:49 UTC 2019


>>>> After switching to strong to-space invariant and pre-evacuating all root, thread roots are only
>>>> places that may contain to-space oops after updating references during normal concurrent cycles, we
>>>> only need to update them during final updaterefs pause, which should reduce pause time.
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8223951
>>>> Webrev: http://cr.openjdk.java.net/~zgu/JDK-8223951/webrev.00/
>>>
>>> Looks fine to me.
>>>
>>> Aside: I wonder how would be get the thread root with from-space ptr if we don't have safepoints
>>> between loads and the LRBs that give us to-space ptrs after potential evac.
>>
>> I don't think we cann guarantee that we don't get a safepoint between
>> load and LRB.
> 
> Ah, that sucks. Oh well!

Positively speaking: it allows C2 more freedom and move barriers across
safepoints :-) OTOH, with LRB it probably doesn't matter that much. We
may actually attempt to prevent it and save this extra pass. It may not
actually be very difficult: wire up current ctrl in ShLoadBarrierNode
instead of NULL. Knowing C2 I can see all hell break loose though... ;-)

> But that is the only plausible way we can get the non-updated thread root,
> right?

Well, yeah. I think/hope so ;-)

Roman



More information about the shenandoah-dev mailing list