mirror of
https://github.com/golang/go
synced 2024-11-11 22:20:22 -07:00
Revert "runtime: release worldsema before Gosched in STW GC mode"
This reverts commit 05511a5c0a
, CL 208379.
Reason for revert: So that we can cleanly revert
https://golang.org/cl/182657.
Change-Id: I4fdf4f864a093db7866b3306f0f8f856b9f4d684
Reviewed-on: https://go-review.googlesource.com/c/go/+/216357
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
e948d2b73e
commit
ad3cef184e
@ -1368,13 +1368,6 @@ func gcStart(trigger gcTrigger) {
|
||||
work.pauseNS += now - work.pauseStart
|
||||
work.tMark = now
|
||||
})
|
||||
|
||||
// Release the world sema before Gosched() in STW mode
|
||||
// because we will need to reacquire it later but before
|
||||
// this goroutine becomes runnable again, and we could
|
||||
// self-deadlock otherwise.
|
||||
semrelease(&worldsema)
|
||||
|
||||
// In STW mode, we could block the instant systemstack
|
||||
// returns, so don't do anything important here. Make sure we
|
||||
// block rather than returning to user code.
|
||||
@ -1382,6 +1375,7 @@ func gcStart(trigger gcTrigger) {
|
||||
Gosched()
|
||||
}
|
||||
|
||||
semrelease(&worldsema)
|
||||
semrelease(&work.startSema)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user