From: Michael Anthony Knyszek Date: Wed, 18 May 2022 23:47:03 +0000 (+0000) Subject: runtime: use osyield in runqgrab on netbsd X-Git-Tag: go1.19beta1~181 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b93ceefa7b47167f7bc9ec471905c136b234d34f;p=gostls13.git runtime: use osyield in runqgrab on netbsd NetBSD appears to have the same issue OpenBSD had in runqgrab. See issue #52475 for more details. For #35166. Change-Id: Ie53192d26919b4717bc0d61cadd88d688ff38bb4 Reviewed-on: https://go-review.googlesource.com/c/go/+/407139 Run-TryBot: Michael Knyszek TryBot-Result: Gopher Robot Reviewed-by: Michael Pratt --- diff --git a/src/runtime/proc.go b/src/runtime/proc.go index f5e528e8e9..7ac6279c40 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -5955,7 +5955,7 @@ func runqgrab(_p_ *p, batch *[256]guintptr, batchHead uint32, stealRunNextG bool // between different Ps. // A sync chan send/recv takes ~50ns as of time of // writing, so 3us gives ~50x overshoot. - if GOOS != "windows" && GOOS != "openbsd" { + if GOOS != "windows" && GOOS != "openbsd" && GOOS != "netbsd" { usleep(3) } else { // On some platforms system timer granularity is