Making a MRSW mutex available in Hotspot would allow for more diverse implementation options which may lessen our maintenance load.
For example, in UL there is a lock-free linked list which is written to very seldomly when in production. It's fairly complex code and would be greatly simplified by being replaced with something wrapped around a MRSW mutex.
This is especially relevant as ZGC has already implemented a Reader-Writer lock[0] that we can directly port.
[0] https://github.com/openjdk/zgc/blob/zgc_generational/src/hotspot/share/gc/z/zJNICritical.cpp
For example, in UL there is a lock-free linked list which is written to very seldomly when in production. It's fairly complex code and would be greatly simplified by being replaced with something wrapped around a MRSW mutex.
This is especially relevant as ZGC has already implemented a Reader-Writer lock[0] that we can directly port.
[0] https://github.com/openjdk/zgc/blob/zgc_generational/src/hotspot/share/gc/z/zJNICritical.cpp
- links to
-
Review openjdk/jdk/9838