1
0
mirror of https://github.com/golang/go synced 2024-11-11 23:50:22 -07:00
go/src
Rick Hudson 90a19961f2 runtime: reduce latency by aggressively ending mark phase
Some latency regressions have crept into our system over the past few
weeks. This CL fixes those by having the mark phase more aggressively
blacken objects so that the mark termination phase, a STW phase, has less
work to do. Three approaches were taken when the mark phase believes
it has no more work to do, ie all the work buffers are empty.
If things have gone well the mark phase is correct and there is
in fact little or no work. In that case the following items will
take very little time. If the mark phase is wrong this CL will
ferret that work out and give the mark phase a chance to deal with
it concurrently before mark termination begins.

When the mark phase first appears to be out of work, it does three things:
1) It switches from allocating white to allocating black to reduce the
number of unmarked objects reachable only from stacks.
2) It flushes and disables per-P GC work caches so all work must be in
globally visible work buffers.
3) It rescans the global roots---the BSS and data segments---so there
are fewer objects to blacken during mark termination. We do not rescan
stacks at this point, though that could be done in a later CL.
After these steps, it again drains the global work buffers.

On a lightly loaded machine the garbage benchmark has reduced the
number of GC cycles with latency > 10 ms from 83 out of 4083 cycles
down to 2 out of 3995 cycles. Maximum latency was reduced from
60+ msecs down to 20 ms.

Change-Id: I152285b48a7e56c5083a02e8e4485dd39c990492
Reviewed-on: https://go-review.googlesource.com/10590
Reviewed-by: Austin Clements <austin@google.com>
2015-06-18 21:38:46 +00:00
..
archive all: switch to the new deprecation convention 2015-06-18 19:16:23 +00:00
bufio
builtin
bytes bytes, strings: add LastIndexByte 2015-04-30 07:13:18 +00:00
cmd cmd/compile: provide better error when method called without receiver 2015-06-18 19:37:38 +00:00
compress compress/lzw: be consistent with error message prefixes. 2015-06-18 05:31:38 +00:00
container
crypto all: extract "can I exec?" check from tests into internal/testenv 2015-06-16 18:07:36 +00:00
database/sql database/sql: refer correct issue in TestErrBadConnReconnect comment 2015-06-06 02:17:49 +00:00
debug all: fix misprints in comments 2015-06-11 14:18:57 +00:00
encoding xml: add check of version in document declaration 2015-06-18 18:06:01 +00:00
errors
expvar
flag flag: Describe the ErrorHandling enum values. 2015-06-05 13:53:26 +00:00
fmt fmt: scanning widths apply after leading spaces 2015-06-13 04:33:26 +00:00
go go/parser: document that parser accepts a wider language than specified 2015-06-18 20:31:26 +00:00
hash hash/crc32: speedup crc32 of IEEE using slicingBy8 2015-06-18 18:14:24 +00:00
html html/template: prevent panic when escaping actions involving chain nodes 2015-06-01 20:52:04 +00:00
image all: switch to the new deprecation convention 2015-06-18 19:16:23 +00:00
index/suffixarray
internal internal/testenv: skip network tests only when -short is specified 2015-06-18 21:10:44 +00:00
io io: minor improvements to doc comment on WriteString. 2015-05-29 04:33:15 +00:00
log log: fix flaky test 2015-06-18 18:08:17 +00:00
math math/big: Add small complete example of big.Float usage 2015-06-18 21:08:41 +00:00
mime mime: add mime.types paths for BSDs 2015-06-12 15:51:21 +00:00
net net: fix build on android 2015-06-18 00:45:12 +00:00
os os: skip TestHostname on Plan 9 2015-06-16 22:07:01 +00:00
path path: fix a typo in documentation of Split 2015-05-31 22:08:38 +00:00
reflect runtime: use type-based write barrier for remote stack write during chansend 2015-06-15 16:50:30 +00:00
regexp regexp: small correction to test comment 2015-06-14 17:09:13 +00:00
runtime runtime: reduce latency by aggressively ending mark phase 2015-06-18 21:38:46 +00:00
sort
strconv strconv: minor internal comment fix 2015-05-27 22:02:02 +00:00
strings strings: mention UTF-8 in the package comment. 2015-06-03 19:28:41 +00:00
sync all: use RET instead of RETURN on ppc64 2015-06-06 00:07:23 +00:00
syscall all: switch to the new deprecation convention 2015-06-18 19:16:23 +00:00
testing testing: don't print CPU count for tests, only benchmarks 2015-06-15 18:11:06 +00:00
text all: switch to the new deprecation convention 2015-06-18 19:16:23 +00:00
time time: correct unrepresentable Unix time comment 2015-06-18 18:21:59 +00:00
unicode
unsafe
all.bash
all.bat
all.rc
androidtest.bash androidtest.bash: clean up stale GOROOT 2015-05-25 20:53:26 +00:00
bootstrap.bash
buildall.bash buildall.bash: exit 1 when make.bash fails 2015-05-17 01:40:33 +00:00
clean.bash build: fix clean scripts 2015-06-18 16:13:13 +00:00
clean.bat build: fix clean scripts 2015-06-18 16:13:13 +00:00
clean.rc build: fix clean scripts 2015-06-18 16:13:13 +00:00
iostest.bash
make.bash doc: replace references to {5..9}{g,l} with go tool compile and go tool link 2015-06-17 04:05:50 +00:00
make.bat doc: replace references to {5..9}{g,l} with go tool compile and go tool link 2015-06-17 04:05:50 +00:00
Make.dist
make.rc doc: replace references to {5..9}{g,l} with go tool compile and go tool link 2015-06-17 04:05:50 +00:00
nacltest.bash nacltest.bash: remove syscall/fstest_nacl.go after test 2015-05-02 02:48:32 +00:00
race.bash cmd/dist: move guts of race.bash into dist 2015-06-09 05:22:37 +00:00
race.bat cmd/dist: move guts of race.bash into dist 2015-06-09 05:22:37 +00:00
run.bash build: correct quoting of args in run.bash 2015-05-09 04:23:47 +00:00
run.bat
run.rc