RFR: 8276663: Cleanup NMT AccessLock [v3]

Zhengyu Gu zgu at openjdk.java.net
Mon Nov 8 13:15:38 UTC 2021


On Fri, 5 Nov 2021 13:54:35 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

>> Please review this cleanup patch to NMT AccessLock:
>> 
>> * Make LockState enum private, no external use.
>> * const lock location pointer
>> * Use memory_order_acquire/memory_order_release for lock counter updates.
>> 
>> Test:
>> - [x] hotspot_nmt on x86_64 and aarch64
>
> Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix memory ordering

It has been a long time. 

I reread the code. Yes, it is a kind of count-down-latch, which allows read-only walk to complete before list can be destroyed. 

Now, I suspect that AccessLock is *not* sufficient, cause it does not guard against insertion.

I would like to withdraw this PR for now.

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

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


More information about the hotspot-runtime-dev mailing list