]> Cypherpunks repositories - gostls13.git/commit
runtime: fix GC assist retry path
authorAustin Clements <austin@google.com>
Mon, 10 Oct 2016 16:18:00 +0000 (12:18 -0400)
committerAustin Clements <austin@google.com>
Mon, 17 Oct 2016 19:09:37 +0000 (19:09 +0000)
commit984753b665875cd62f6144a42f6df58cb5f159a8
tree9e2595838f212f3b876249426e78bcd9e0f9dd81
parent81c431a53780d90ebe8a81205db9b3bee7824ffd
runtime: fix GC assist retry path

GC assists retry if preempted or if they fail to park. However, on the
retry path they currently use stale statistics. In particular, the
retry can use "debtBytes", but debtBytes isn't updated when the debt
changes (since other than retries it is only used once). Also, though
less of a problem, the if the assist ratio has changed while the
assist was blocked, the retry will still use the old assist ratio.

Fix all of this by simply making the retry jump back to where we
compute these statistics, rather than just after.

Change-Id: I2ed8b4f0fc9f008ff060aa926f4334b662ac7d3f
Reviewed-on: https://go-review.googlesource.com/30701
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgcmark.go