From 64c22b70bf00e15615bb17c29f808b55bc339682 Mon Sep 17 00:00:00 2001 From: Michael Knyszek Date: Fri, 24 Jan 2020 16:51:11 +0000 Subject: Revert "runtime: don't hold worldsema across mark phase" This reverts commit 7b294cdd8df0a9523010f6ffc80c59e64578f34b, CL 182657. Reason for revert: This change may be causing latency problems for applications which call ReadMemStats, because it may cause all goroutines to stop until the GC completes. https://golang.org/cl/215157 fixes this problem, but it's too late in the cycle to land that. Updates #19812. Change-Id: Iaa26f4dec9b06b9db2a771a44e45f58d0aa8f26d Reviewed-on: https://go-review.googlesource.com/c/go/+/216358 Run-TryBot: Michael Knyszek TryBot-Result: Gobot Gobot Reviewed-by: Cherry Zhang --- src/runtime/debug.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/runtime/debug.go') diff --git a/src/runtime/debug.go b/src/runtime/debug.go index 76eeb2e41a..af5c3a1170 100644 --- a/src/runtime/debug.go +++ b/src/runtime/debug.go @@ -26,12 +26,12 @@ func GOMAXPROCS(n int) int { return ret } - stopTheWorldGC("GOMAXPROCS") + stopTheWorld("GOMAXPROCS") // newprocs will be processed by startTheWorld newprocs = int32(n) - startTheWorldGC() + startTheWorld() return ret } -- cgit v1.3