RFR: 8276663: Cleanup NMT AccessLock [v2]

Aleksey Shipilev shade at openjdk.java.net
Fri Nov 5 08:56:09 UTC 2021


On Fri, 5 Nov 2021 03:48:36 GMT, David Holmes <dholmes at openjdk.org> wrote:

> I do not understand this change. The "counter" is what makes the lock acts as a lock. Locks generally require acquire/release semantics wrt. to the locking and unlocking around a critical section. So how can you switch to use mo_relaxed?

+1. We cannot do this relaxation here, unless we also add explicit fences. I think the best we can do here is to "relax" `mo_conservative` (double-sided barrier) to `mo_seqcst` (which still have the memory ordering semantics we want for locks).

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

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


More information about the hotspot-runtime-dev mailing list