]> Cypherpunks repositories - gostls13.git/commit
runtime: work around "P has cached GC work" failures
authorAustin Clements <austin@google.com>
Thu, 3 Jan 2019 19:48:30 +0000 (14:48 -0500)
committerAustin Clements <austin@google.com>
Fri, 4 Jan 2019 01:24:58 +0000 (01:24 +0000)
commit95a6f112c6db064d3394f9f66aa569e9bbeb3617
tree5bf271132f09bdb31a1de6f6b4cf4ec1afb59de9
parent9a7278ae47fd2ef9675e4303409e726e429d64e3
runtime: work around "P has cached GC work" failures

We still don't understand what's causing there to be remaining GC work
when we enter mark termination, but in order to move forward on this
issue, this CL implements a work-around for the problem.

If debugCachedWork is false, this CL does a second check for remaining
GC work as soon as it stops the world for mark termination. If it
finds any work, it starts the world again and re-enters concurrent
mark. This will increase STW time by a small amount proportional to
GOMAXPROCS, but fixes a serious correctness issue.

This works-around #27993.

Change-Id: Ia23b85dd6c792ee8d623428bd1a3115631e387b8
Reviewed-on: https://go-review.googlesource.com/c/156140
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgc.go