RFR: 8291555: Implement alternative fast-locking scheme [v52]

David Holmes dholmes at openjdk.org
Wed Apr 5 00:17:45 UTC 2023


On Tue, 4 Apr 2023 22:12:03 GMT, David Holmes <dholmes at openjdk.org> wrote:

>>> Given the owner could release the monitor the moment after we check I don't see how false results are an issue here. The existing code should be safe when not executed at a safepoint..
>> 
>> I checked again. It looks like the DeadLock test now passes even if I let the code in management.cpp go check stacks without safepoint. I believe the addition of the start_processing() to LockStack::contains() fixes the ZGC problem. But please, run the full tests again on Mach5. I don't see any failures here.
>
>> When it is anonymously locked it must be waiting. 
> 
> I guess I am unclear what "waiting" refers to here, and which "thread" we are checking for what. If the monitor is anonymously locked then we know it is contended - perhaps that is what this "waiting" means?

> The existing code should be safe when not executed at a safepoint.

Just to be clear I meant the code before your changes should be safe. Your code needs to establish it is safe - which takes us back to the issue of querying the lock-stack while it may be being concurrently pushed/popped.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/10907#discussion_r1157820627


More information about the serviceability-dev mailing list