RFR: 8272447: Remove 'native' ranked Mutex [v3]

David Holmes dholmes at openjdk.java.net
Tue Aug 24 04:42:29 UTC 2021


On Mon, 23 Aug 2021 12:20:45 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> I'm not at all sure why we would care about a gtest Mutex in terms of the ranking system?
>
> 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.

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

PR: https://git.openjdk.java.net/jdk/pull/5116


More information about the hotspot-runtime-dev mailing list