RFR: 8261493: Shenandoah: reconsider bitmap access memory ordering

Aleksey Shipilev shade at openjdk.java.net
Fri Feb 12 07:34:38 UTC 2021


On Thu, 11 Feb 2021 18:07:58 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

> Now, you need load barrier on read side (e.g. ShenandoahMarkBitMap::at()). Although, it is not a correctness issue, but seeing stale value means extra unnecessary work.

I don't see why. Adding load barriers would not affect promptness of seeing the memory updates to the bitmap itself. It might affect the promptness of seeing the object contents that we are reading after asking `is_marked` -- but that would be a race either way, because we do not use mark bitmap for memory ordering at all (i.e. there is no "release" on bitmap update).

-------------

PR: https://git.openjdk.java.net/jdk/pull/2497


More information about the shenandoah-dev mailing list