]> Cypherpunks repositories - gostls13.git/commit
undo CL 9776044 / 1e280889f997
authorDmitriy Vyukov <dvyukov@google.com>
Thu, 27 Jun 2013 17:03:35 +0000 (21:03 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Thu, 27 Jun 2013 17:03:35 +0000 (21:03 +0400)
commit7ebb187e8e5e588d8c594213ff5187917c4abb20
tree53e4affca48fbd6faed50a30a3e94572ddc77ea6
parent15a1c3d1e46393a0b05ef5f518d1f4d0b7c638b8
undo CL 9776044 / 1e280889f997

Failure on bot:
http://build.golang.org/log/f4c648906e1289ec2237c1d0880fb1a8b1852a08

««« original CL description
runtime: fix CPU underutilization
runtime.newproc/ready are deliberately sloppy about waking new M's,
they only ensure that there is at least 1 spinning M.
Currently to compensate for that, schedule() checks if the current P
has local work and there are no spinning M's, it wakes up another one.
It does not work if goroutines do not call schedule.
With this change a spinning M wakes up another M when it finds work to do.
It's also not ideal, but it fixes the underutilization.
A proper check would require to know the exact number of runnable G's,
but it's too expensive to maintain.
Fixes #5586.

R=rsc
TBR=rsc
CC=gobot, golang-dev
https://golang.org/cl/9776044
»»»

R=golang-dev
CC=golang-dev
https://golang.org/cl/10692043
src/pkg/runtime/proc.c
src/pkg/runtime/proc_test.go