RFR: Concurrent code cache evac should not update ptrs outside of safepoint
Roman Kennke
rkennke at redhat.com
Fri Jun 30 13:01:57 UTC 2017
Am 30.06.2017 um 14:55 schrieb Aleksey Shipilev:
> Turns out, I made the hell of the mistake by trying to update embedded code
> cache ptrs during concurrent code cache evac. Updating code cache roots outside
> safepoint is fine. Until it is not, when address you overwrite is not aligned.
> Then you have the non-atomic store, and crash on a weird ptr, if application is
> unlucky to be at that insn at that time. On x86, you need code cache ptr to span
> cache lines.
>
> The answer is to still evacuate code cache concurrently, but update the pointers
> only at STW:
>
> http://cr.openjdk.java.net/~shade/shenandoah/codecache-conc-evac-stwupdate/webrev.01/
>
> This still has around 50% of the original pause improvement, and it moves the
> code cache update pause from overloaded final-mark to less loaded
> final-update-refs (when UR is active), further amortizing it.
>
> Testing: hotspot_gc_shenandoah, failing tests
>
> Thanks,
> -Aleksey
>
Good catch! Looks good to me!
Roman
More information about the shenandoah-dev
mailing list