[crac] RFR: RCU Lock - RW lock with very lightweight read- and heavyweight write-locking [v5]

Anton Kozlov akozlov at openjdk.org
Thu Apr 13 13:18:09 UTC 2023


On Wed, 12 Apr 2023 15:02:05 GMT, Radim Vansa <duke at openjdk.org> wrote:

>> This implementation is suitable for uses where the write-locking happens very rarely (if at all), as in the case of CRaC checkpoint, and we don't want to slow down regular access to the protected resource.
>
> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add synchronized context

AFAICS this is an optimized version of ReadWriteLock, but it does not implement the j.u.c.l.ReadWriteLock interface. Can it be changed to implement the interface?

Also, having this is an optimization, what is the benefit of the new RCULock compared to e.g. a standard j.u.c.l.ReentrantReadWriteLock? A JMH benchmark would be nice.

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

PR Comment: https://git.openjdk.org/crac/pull/58#issuecomment-1506946513


More information about the crac-dev mailing list