]> Cypherpunks repositories - gostls13.git/commit
runtime: fix idle time double-counting bug
authorMichael Anthony Knyszek <mknyszek@google.com>
Tue, 15 Jul 2025 17:11:18 +0000 (17:11 +0000)
committerMichael Knyszek <mknyszek@google.com>
Wed, 16 Jul 2025 20:31:59 +0000 (13:31 -0700)
commit385000b004616d5c42c868a2a072432cb65ca692
tree044fef9d5a13d8024d870be2cd42cec4035b1508
parentf506ad2644ff9c76d7e9fa00710248009d449cac
runtime: fix idle time double-counting bug

This change fixes a bug in the accounting of sched.idleTime. In just the
case where the GC CPU limiter needs up-to-date data, sched.idleTime is
incremented in both the P-idle-time and idle-mark-work paths, but it
should only be incremented in the former case.

Fixes #74627.

Change-Id: If41b03da102d47d25bec48ff750a9da27019b71d
Reviewed-on: https://go-review.googlesource.com/c/go/+/687998
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/mgclimit.go