]> Cypherpunks repositories - gostls13.git/commit
runtime: split findRunnableGCWorker in two
authorMichael Pratt <mpratt@google.com>
Mon, 17 Nov 2025 20:09:50 +0000 (15:09 -0500)
committerGopher Robot <gobot@golang.org>
Thu, 20 Nov 2025 16:08:47 +0000 (08:08 -0800)
commit829779f4fe7e002b959a2f4966aa9e21c59e418c
tree5492847fe797f93bc9e07a1565dcab3423e38284
parentab5956909952aa625ab8d51086beca299477e7b0
runtime: split findRunnableGCWorker in two

The first part, assignWaitingGCWorker selects a mark worker (if any) and
assigns it to the P. The second part, findRunnableGCWorker, is
responsible for actually marking the worker as runnable and updating the
CPU limiter.

The advantage of this split is that assignWaitingGCWorker is safe to do
during STW, which will allow the next CL to make selections during
procresize.

This change is a semantic no-op in preparation for the next CL.

For #65694.

Change-Id: I6a6a636c8beb212185829946cfa1e49f706ac31a
Reviewed-on: https://go-review.googlesource.com/c/go/+/721001
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
src/runtime/mgc.go
src/runtime/mgcpacer.go
src/runtime/runtime2.go