]> Cypherpunks repositories - gostls13.git/commit
gc: limit helper threads based on ncpu
authorJoel Sing <jsing@google.com>
Wed, 5 Oct 2011 16:08:28 +0000 (12:08 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 5 Oct 2011 16:08:28 +0000 (12:08 -0400)
commita5f064a3e127b1d54853822a608137d3539b578f
tree363ea2baed90d10810ea9cb9521453c086361fbf
parent528ccdc513b76143154c52ebb9d93b79faeaa0b1
gc: limit helper threads based on ncpu

When ncpu < 2, work.nproc is always 1 which results in infinite helper
threads being created if gomaxprocs > 1 and MaxGcproc > 1. Avoid this
by using the same limits as imposed helpgc().

R=golang-dev, rsc, dvyukov
CC=golang-dev
https://golang.org/cl/5176044
src/pkg/runtime/mgc0.c