RFR: 8291714: Implement a Multi-Reader Single-Writer mutex for Hotspot [v5]
David Holmes
dholmes at openjdk.org
Tue Aug 30 00:16:30 UTC 2022
On Mon, 29 Aug 2022 08:47:31 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 incrementally with one additional commit since the last revision:
>
> Review comments
src/hotspot/share/utilities/readWriteLock.hpp line 91:
> 89: ~ReadWriteLock() = default;
> 90:
> 91: void write_lock(Thread* current = Thread::current_or_null());
I'm not seeing the motivation for allowing current to be null with these latest changes.
-------------
PR: https://git.openjdk.org/jdk/pull/9838
More information about the hotspot-runtime-dev
mailing list