RFR: 8272447: Remove 'native' ranked Mutex [v3]
Coleen Phillimore
coleenp at openjdk.java.net
Wed Aug 25 13:30:28 UTC 2021
On Tue, 24 Aug 2021 04:39:16 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> We could make it a PlatformMutex if we don't care about ranking. Having the "native" rank available to bypass the ranking system is very confusing (why on earth is it > max_nonleaf, for instance?) and tempts misuse. The ranking system has been long standing technical debt that everybody on the project has complained about at one time or another, and this is a small cleanup to remove one part of that.
>
> I guess "leaf" is as close to "not significant in terms of ranking" as we need to get in this case. I really don't like the idea of not using Mutexes just because we run into a ranking issue - PlatformMutex is meant as a building block not something for direct use. I guess gtest authors that need mutexes need to be careful about what they do while holding those mutexes.
Yes, just like all other uses of Mutexes, you have to be aware of what locks can be taken while this lock is held.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5116
More information about the hotspot-runtime-dev
mailing list