]> Cypherpunks repositories - gostls13.git/commit
runtime: decentralize mark done and mark termination
authorAustin Clements <austin@google.com>
Mon, 26 Oct 2015 15:27:37 +0000 (11:27 -0400)
committerAustin Clements <austin@google.com>
Thu, 5 Nov 2015 21:23:54 +0000 (21:23 +0000)
commitc99d7f7f852b525694c645e00b6c06729a6735a2
treeb5aa6eadcea25e706eb9d36a329f90b1ad5a5e1e
parentd986bf27414161f4a4fc41c4c564bad26ebc57e7
runtime: decentralize mark done and mark termination

This moves all of the mark 1 to mark 2 transition and mark termination
to the mark done transition function. This means these transitions are
now handled on the goroutine that detected mark completion. This also
means that the GC coordinator and the background completion barriers
are no longer used and various workarounds to yield to the coordinator
are no longer necessary. These will be removed in follow-up commits.

One consequence of this is that mark workers now need to be
preemptible when performing the mark done transition. This allows them
to stop the world and to perform the final clean-up steps of GC after
restarting the world. They are only made preemptible while performing
this transition, so if the worker findRunnableGCWorker would schedule
isn't available, we didn't want to schedule it anyway.

Fixes #11970.

Change-Id: I9203a2d6287eeff62d589ec02ad9cb1e29ddb837
Reviewed-on: https://go-review.googlesource.com/16391
Reviewed-by: Rick Hudson <rlh@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/malloc.go
src/runtime/mgc.go
src/runtime/mgcmark.go
src/runtime/proc.go