mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: clarify GC fractional mode description
nowdays, in runtime/mgc.go,we can see the comment descrition : The fractional worker is necessary when GOMAXPROCS*gcBackgroundUtilization is not an integer.
but it not true such as GOMAXPROCS=5.
in the implemet of startCycle() , Fractional Mode happend only when
GOMAXPROCS<=3 or GOMAXPROCS=6. so utilization can closest to 25%.
Fixes #44380
Change-Id: Id0dd6d9f37759c2c9231f164a013a014216dd442
GitHub-Last-Rev: 5910e76324
GitHub-Pull-Request: golang/go#44381
Reviewed-on: https://go-review.googlesource.com/c/go/+/293630
Reviewed-by: Austin Clements <austin@google.com>
Trust: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
a671e33c6d
commit
d434c2338b
1 changed files with 5 additions and 3 deletions
|
|
@ -302,9 +302,11 @@ const (
|
||||||
// gcMarkWorkerFractionalMode indicates that a P is currently
|
// gcMarkWorkerFractionalMode indicates that a P is currently
|
||||||
// running the "fractional" mark worker. The fractional worker
|
// running the "fractional" mark worker. The fractional worker
|
||||||
// is necessary when GOMAXPROCS*gcBackgroundUtilization is not
|
// is necessary when GOMAXPROCS*gcBackgroundUtilization is not
|
||||||
// an integer. The fractional worker should run until it is
|
// an integer and using only dedicated workers would result in
|
||||||
// preempted and will be scheduled to pick up the fractional
|
// utilization too far from the target of gcBackgroundUtilization.
|
||||||
// part of GOMAXPROCS*gcBackgroundUtilization.
|
// The fractional worker should run until it is preempted and
|
||||||
|
// will be scheduled to pick up the fractional part of
|
||||||
|
// GOMAXPROCS*gcBackgroundUtilization.
|
||||||
gcMarkWorkerFractionalMode
|
gcMarkWorkerFractionalMode
|
||||||
|
|
||||||
// gcMarkWorkerIdleMode indicates that a P is running the mark
|
// gcMarkWorkerIdleMode indicates that a P is running the mark
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue