]> Cypherpunks repositories - gostls13.git/commit
runtime: make gcDrainN in terms of scan work
authorAustin Clements <austin@google.com>
Fri, 13 Mar 2015 18:01:16 +0000 (14:01 -0400)
committerAustin Clements <austin@google.com>
Tue, 21 Apr 2015 15:35:14 +0000 (15:35 +0000)
commit028f9728473c6e7590ecaa7d30b0288df4a5731a
tree94126f07beded061cb8dfd859d2997b6dfdcd2ca
parent8e24283a28f9b739cdbd990994c9c98e3855f7ed
runtime: make gcDrainN in terms of scan work

Currently, the "n" in gcDrainN is in terms of objects to scan. This is
used by gchelpwork to perform a limited amount of work on allocation,
but is a pretty arbitrary way to bound this amount of work since the
number of objects has little relation to how long they take to scan.

Modify gcDrainN to perform a fixed amount of scan work instead. For
now, gchelpwork still performs a fairly arbitrary amount of scan work,
but at least this is much more closely related to how long the work
will take. Shortly, we'll use this to precisely control the scan work
performed by mutator assists during allocation to achieve the heap
size goal.

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