mirror of
https://github.com/golang/go
synced 2024-11-24 07:50:13 -07:00
runtime: rewrite stale comment about pacer
Change-Id: Ieb8015164526da59b042031234146def06f70a1d Reviewed-on: https://go-review.googlesource.com/c/go/+/393399 Trust: Michael Knyszek <mknyszek@google.com> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
f990b0f1e8
commit
23756207fb
@ -73,15 +73,14 @@ func init() {
|
|||||||
// when to trigger concurrent garbage collection and how much marking
|
// when to trigger concurrent garbage collection and how much marking
|
||||||
// work to do in mutator assists and background marking.
|
// work to do in mutator assists and background marking.
|
||||||
//
|
//
|
||||||
// It uses a feedback control algorithm to adjust the gcController.trigger
|
// It calculates the ratio between the allocation rate (in terms of CPU
|
||||||
// trigger based on the heap growth and GC CPU utilization each cycle.
|
// time) and the GC scan throughput to determine the heap size at which to
|
||||||
// This algorithm optimizes for heap growth to match GOGC and for CPU
|
// trigger a GC cycle such that no GC assists are required to finish on time.
|
||||||
// utilization between assist and background marking to be 25% of
|
// This algorithm thus optimizes GC CPU utilization to the dedicated background
|
||||||
|
// mark utilization of 25% of GOMAXPROCS by minimizing GC assists.
|
||||||
// GOMAXPROCS. The high-level design of this algorithm is documented
|
// GOMAXPROCS. The high-level design of this algorithm is documented
|
||||||
// at https://golang.org/s/go15gcpacing.
|
// at https://github.com/golang/proposal/blob/master/design/44167-gc-pacer-redesign.md.
|
||||||
//
|
// See https://golang.org/s/go15gcpacing for additional historical context.
|
||||||
// All fields of gcController are used only during a single mark
|
|
||||||
// cycle.
|
|
||||||
var gcController gcControllerState
|
var gcController gcControllerState
|
||||||
|
|
||||||
type gcControllerState struct {
|
type gcControllerState struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user