RFR: 8273300: Check Mutex ranking during a safepoint [v4]
Coleen Phillimore
coleenp at openjdk.java.net
Thu Sep 16 11:53:46 UTC 2021
On Wed, 15 Sep 2021 21:53:17 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> If the gap is 2, then leaf-2 will == oopstorage? I could make it 3 but it doesn't actually matter.
>
> Obviously the gap needs to be big enough to avoid the overlap, but the presence of +1, +3, +6 and +10 just raise questions as to why different values are used. Why not make them all +10 if you need 10 slots in some areas?
I'm going to address this with a future change because we don't have range checking for overlap yet, and they should all be some consistent and not arbitrary range. If it was less arbitrary, I'd pick another 6 because
runtime/mutexLocker.cpp: def(Metaspace_lock , PaddedMutex , leaf-3, true, _safepoint_check_never);
The rank 'service' had 6 because there are at least 4 locks below that. Again, I should add range checking and maybe making them all 10 makes a lot of sense. Locks don't nest that deeply. I'll add this as a comment in: JDK-8176393.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5467
More information about the shenandoah-dev
mailing list