]> Cypherpunks repositories - gostls13.git/commit
runtime: simplify process for starting GC goroutine
authorAustin Clements <austin@google.com>
Wed, 22 Apr 2015 19:05:08 +0000 (15:05 -0400)
committerAustin Clements <austin@google.com>
Fri, 24 Apr 2015 15:13:05 +0000 (15:13 +0000)
commit0e6a6c510f870709ac7bba8470bed7f862f579b1
tree51a9f64223103781a02b3021b8414bef009388f3
parentce502b063cd810aa5897e6ce72d545591e9368a0
runtime: simplify process for starting GC goroutine

Currently, when allocation reaches the GC trigger, the runtime uses
readyExecute to start the GC goroutine immediately rather than wait
for the scheduler to get around to the GC goroutine while the mutator
continues to grow the heap.

Now that the scheduler runs the most recently readied goroutine when a
goroutine yields its time slice, this rigmarole is no longer
necessary. The runtime can simply ready the GC goroutine and yield
from the readying goroutine.

Change-Id: I3b4ebadd2a72a923b1389f7598f82973dd5c8710
Reviewed-on: https://go-review.googlesource.com/9292
Reviewed-by: Rick Hudson <rlh@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
src/runtime/mgc.go
src/runtime/proc1.go