]> Cypherpunks repositories - gostls13.git/commit
runtime: control background scan credit flushing with flag
authorAustin Clements <austin@google.com>
Mon, 5 Oct 2015 02:47:27 +0000 (22:47 -0400)
committerAustin Clements <austin@google.com>
Fri, 9 Oct 2015 19:38:16 +0000 (19:38 +0000)
commitc18b163c1590d43d78a1a7386d624d4aab234f40
treefbccd02b3740f2939f0fbe10dabea6ac64609a8c
parent9b3cdaf0a3bd179a5459312112ef115866b09985
runtime: control background scan credit flushing with flag

Currently callers of gcDrain control whether it flushes scan work
credit to gcController.bgScanCredit by passing a value other than -1
for the flush threshold. Shortly we're going to make this always flush
scan work to gcController.scanWork and optionally also flush scan work
to gcController.bgScanCredit. This will be much easier if the flush
threshold is simply a constant (which it is in practice) and callers
merely control whether or not the flush includes the background
credit. Hence, replace the flush threshold argument with a flag.

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