diff --git a/src/runtime/proc.go b/src/runtime/proc.go index 3ee5805aefc..f479967d419 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -3136,7 +3136,9 @@ top: } if gp == nil && gcBlackenEnabled != 0 { gp = gcController.findRunnableGCWorker(_g_.m.p.ptr()) - tryWakeP = tryWakeP || gp != nil + if gp != nil { + tryWakeP = true + } } if gp == nil { // Check the global runnable queue once in a while to ensure fairness.