]> Cypherpunks repositories - gostls13.git/commit
runtime: move the wakeableSleep lock under sched in the lock rank
authorMichael Anthony Knyszek <mknyszek@google.com>
Tue, 21 Nov 2023 23:46:48 +0000 (23:46 +0000)
committerMichael Knyszek <mknyszek@google.com>
Wed, 22 Nov 2023 16:31:43 +0000 (16:31 +0000)
commit23c0d30244d5e38d928e68661bf39458eb85d2b2
tree80d63f471609f2c9425e9ca845fe48e4fe69442c
parente4ea6283e484b7c1e8263c3cda8647b1962815db
runtime: move the wakeableSleep lock under sched in the lock rank

Currently the wakeableSleep lock is placed just after timers in the
ranking, but it turns out the timers lock can never be held over a timer
func, so that's wrong. Meanwhile, wakeableSleep can acquire sched.lock.

wakeableSleep, as it turns out, doesn't have any dependencies -- it's
always acquired in a (mostly) regular goroutine context.

Change-Id: Icc8ea76a8b309fbaf0f02215f16e5f706d49cd95
Reviewed-on: https://go-review.googlesource.com/c/go/+/544395
TryBot-Bypass: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/runtime/lockrank.go
src/runtime/mklockrank.go