RFR: 8291714: Implement a Multi-Reader Single-Writer mutex for Hotspot [v4]
Johan Sjölén
duke at openjdk.org
Mon Aug 29 08:47:31 UTC 2022
On Thu, 25 Aug 2022 13:06:01 GMT, Johan Sjölén <duke at openjdk.org> wrote:
>> May I please have a review for this PR which implements a `MRWMutex` class for Hotspot?
>>
>> This PR does 3 things:
>>
>> * Adds a port of ZGC's MRSW mutex (see [0]) to Hotspot
>> * Adds some new utilities for writing multi-threaded tests.
>> * Adds some tests for MRSW Mutex using these new utilities
>>
>> The ticket has some comments which might be worth checking out: https://bugs.openjdk.org/browse/JDK-8291714
>>
>> [0] Original source code here: https://github.com/openjdk/zgc/blob/zgc_generational/src/hotspot/share/gc/z/zJNICritical.cpp
>
> Johan Sjölén has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits:
>
> - Fix tests for updated threadHelper
> - Remove outdated threadHelper
> - Update documentation
> - Fix outdated headers and remove dead code
> - Review comments
> - Implement MRSWMutex
Latest addresses most of Kim's review comments. It also makes the `current` thread optional, allowing it to be null. This is mainly useful if the lock is used very early in initialization.
-------------
PR: https://git.openjdk.org/jdk/pull/9838
More information about the hotspot-runtime-dev
mailing list