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

Coleen Phillimore coleenp at openjdk.java.net
Mon Aug 23 12:23:30 UTC 2021


On Mon, 23 Aug 2021 04:56:36 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> 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.
>
> The SharedDecoder lock is used during crash reporting and so could potentially be taken whilst any other lock is held. While we special case the use of the Decoder in the initial error reporting thread, by not taking the lock due to the deadlock potential, it will still be taken by threads that encounter a secondary error. That is what makes this lock "special".

That's why it's ranking is very low, below tty.  If we think it should not participate in lock ranking for deadlock detection we can make it a PlatformMutex, but I don't see any evidence that this is needed.

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

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


More information about the hotspot-runtime-dev mailing list