]> Cypherpunks repositories - gostls13.git/commit
runtime: ensure fair scheduling during frequent GCs
authorDmitriy Vyukov <dvyukov@google.com>
Tue, 21 Jan 2014 06:24:42 +0000 (10:24 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Tue, 21 Jan 2014 06:24:42 +0000 (10:24 +0400)
commit90eca36a23cf5ec59a46626771f8074e2b68df60
treecda607683a665e6b0e783958eeb8c23e829cfe2d
parentcfb9cf0f0679b07583b8667487c516b1f77f2292
runtime: ensure fair scheduling during frequent GCs
What was happenning is as follows:
Each writer goroutine always triggers GC during its scheduling quntum.
After GC goroutines are shuffled so that the timer goroutine is always second in the queue.
This repeats infinitely, causing timer goroutine starvation.
Fixes #7126.

R=golang-codereviews, shanemhansen, khr, khr
CC=golang-codereviews
https://golang.org/cl/53080043
src/pkg/runtime/proc.c
src/pkg/runtime/proc_test.go