RFR: 8291714: Implement a Multi-Reader Single-Writer mutex for Hotspot [v3]
Thomas Stuefe
stuefe at openjdk.org
Thu Aug 25 12:44:31 UTC 2022
On Thu, 25 Aug 2022 10:07:05 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Johan Sjölén has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Update documentation
>> - Fix outdated headers and remove dead code
>
> I don't have time to review, just chiming in that I look forward to use RWL in NMT, to simplify the lockless MST.
> @tstuefe I have a memory of there being a lock like this in NMT, but it must have been removed.
>
There is a lock for queries. MST is lockless for normal operations, which makes the table a bit cumbersome and not ideally sorted (bucket chains sorted reverse from what would be good). Normally this is not a big problem since those chains are short.
> If there's an upcoming use of this RWL lock, then we should integrate it first and not bundle it with the client code.
Certainly. I was not planning to do it right away, just voicing my support for this RWL idea.
I have to look again at this anyway, maybe I'm overlooking something. E.g. I'm not sure if the MST needs to be functional beyond VMs normal lifetime. Then it is better to leave it lockless.
-------------
PR: https://git.openjdk.org/jdk/pull/9838
More information about the hotspot-runtime-dev
mailing list