RFR: 8272447: Remove 'native' ranked Mutex
coleenp at openjdk.java.net
Thu Aug 19 14:22:27 UTC 2021
On Mon, 16 Aug 2021 12:13:52 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> [not a review, just replying to @dholmes-ora] Mutex::native isn't an "ultra-high" rank, it is outside the ranking system. Rank checks are not applied for Mutex::native. See the occurrences of Mutex::native in mutex.cpp.
> I stand corrected - thanks @kimbarrett - but my question remains valid. If this was considered outside the ranking system then it was presumably because a suitable rank could not be determined, so what rules are now being used to determine this new rank?
It was outside the ranking system because no appropriate ranking was found for it at the time and 'native' was available. There's no evidence that this lock should be outside the ranking system. The ranking system is to help provide deadlock detection and this lock isn't that special. It is a low ranked lock however because it's taken with the tty lock held, so that's how it got tty-2. If it takes a higher ranked lock (not found by testing), then it'll deadlock and we want to know that.
More information about the hotspot-runtime-dev