]> Cypherpunks repositories - gostls13.git/commit
runtime: do not park sysmon thread if any goroutines are running
authorDmitriy Vyukov <dvyukov@google.com>
Wed, 31 Jul 2013 16:09:03 +0000 (20:09 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Wed, 31 Jul 2013 16:09:03 +0000 (20:09 +0400)
commit658d19a53f26865549653fb16f80a47ae552b4f0
treefff7e21b05d68daabfde0114753f2069323fd12f
parent6ee69a97269eb26186d08832dcafd9432945f5ad
runtime: do not park sysmon thread if any goroutines are running
Sysmon thread parks if no goroutines are running (runtime.sched.npidle ==
runtime.gomaxprocs).
Currently it's unparked when a goroutine enters syscall, it was enough
to retake P's from blocking syscalls.
But it's not enough for reliable goroutine preemption. We need to ensure that
sysmon runs if any goroutines are running.

R=rsc
CC=golang-dev
https://golang.org/cl/12176043
src/pkg/runtime/proc.c