]> Cypherpunks repositories - gostls13.git/commit
runtime: remove gcWork flushes in mark termination
authorAustin Clements <austin@google.com>
Sun, 11 Sep 2016 20:55:34 +0000 (16:55 -0400)
committerAustin Clements <austin@google.com>
Wed, 19 Oct 2016 21:36:09 +0000 (21:36 +0000)
commit9429aab9999e00958abd8b21d06fa4a2253437c2
treeb2a86332dd59558badb4bfed91a5a9a8ae84d6e0
parenta16954b8a7d66169760fb60dd7f3d4e400a5e98c
runtime: remove gcWork flushes in mark termination

The only reason these flushes are still necessary at all is that
gcmarknewobject doesn't flush its gcWork stats like it's supposed to.
By changing gcmarknewobject to follow the standard protocol, the
flushes become completely unnecessary because mark 2 ensures caches
are flushed (and stay flushed) before we ever enter mark termination.

In the garbage benchmark, this takes roughly 50 µs, which is
surprisingly long for doing nothing. We still double-check after
draining that they are in fact empty.

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