RFR: 8212748: ZGC: Add reentrant locking functionality (original) (raw)
Per Liden per.liden at oracle.com
Wed Nov 21 20:08:49 UTC 2018
- Previous message (by thread): RFR: 8212748: ZGC: Add reentrant locking functionality
- Next message (by thread): RFR(XXS): 8214125: [test] Fix comparison between pointer and integer in test_ptrQueueBufferAllocator.cpp
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2018-11-21 14:45, Kim Barrett wrote: [...]
What is RecursiveZLock::isowned for? That might be why the RECURSIVE attribute wasn't used, but since I don't see the point, except perhaps for assertion checks. Part of my question is, if isowned is desirable for recursive case, why not for ordinary? A similar implementation would seem to suffice.
Yes, isowned() is used in some asserts, but more importantly it's used in few other cases too. The locking around concurrent class unloading is a bit messy, but in some contexts (which has multiple entry points) isowned() is used to figure out if it's safe to do some operations because the thread has the lock, or if that should be postponed. That sounds rather icky.
Yes, the locking issues related to class unloading is super-icky. I hope we'll eventually get to a point where all that icky-ness goes away (and hopefully ZReentrantLock can also go away). But it might take some time to get there.
Change looks good.
Thanks for reviewing.
cheers, Per
- Previous message (by thread): RFR: 8212748: ZGC: Add reentrant locking functionality
- Next message (by thread): RFR(XXS): 8214125: [test] Fix comparison between pointer and integer in test_ptrQueueBufferAllocator.cpp
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]