runtime: call goready in wakeScavenger instead of ready

This changes fixes an oversight in wakeScavenger which would cause ready
to be called off of the system stack. This change makes it so that
wakeScavenger calls goready, which switches to the system stack before
calling ready.

Fixes #34773.

Change-Id: Icb13f180b4d8fdd47c921eac1b896e3dd49e43b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/200999
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Michael Anthony Knyszek 2019-10-14 17:33:36 +00:00 committed by Michael Knyszek
parent 11d7775c9f
commit 2c87be436b
1 changed files with 1 additions and 1 deletions

View File

@ -233,7 +233,7 @@ func wakeScavenger() {
// Unpark the goroutine and tell it that there may have been a pacing
// change.
scavenge.parked = false
ready(scavenge.g, 0, true)
goready(scavenge.g, 0)
}
unlock(&scavenge.lock)
}