runtime: rename findrunnable references to findRunnable

These cases were missed by CL 393880.

Change-Id: I6a6a636cf0d97a4efcf4b9df766002ecef48b4de
Reviewed-on: https://go-review.googlesource.com/c/go/+/721120
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
Michael Pratt 2025-11-17 13:34:51 -05:00 committed by Gopher Robot
parent 8e734ec954
commit 6919858338
2 changed files with 11 additions and 11 deletions

View file

@ -3119,7 +3119,7 @@ func startm(pp *p, spinning, lockheld bool) {
//go:nowritebarrierrec //go:nowritebarrierrec
func handoffp(pp *p) { func handoffp(pp *p) {
// handoffp must start an M in any situation where // handoffp must start an M in any situation where
// findrunnable would return a G to run on pp. // findRunnable would return a G to run on pp.
// if it has local work, start it straight away // if it has local work, start it straight away
if !runqempty(pp) || !sched.runq.empty() { if !runqempty(pp) || !sched.runq.empty() {
@ -3362,7 +3362,7 @@ func findRunnable() (gp *g, inheritTime, tryWakeP bool) {
mp := getg().m mp := getg().m
// The conditions here and in handoffp must agree: if // The conditions here and in handoffp must agree: if
// findrunnable would return a G to run, handoffp must start // findRunnable would return a G to run, handoffp must start
// an M. // an M.
top: top:
@ -3586,7 +3586,7 @@ top:
goto top goto top
} }
if releasep() != pp { if releasep() != pp {
throw("findrunnable: wrong p") throw("findRunnable: wrong p")
} }
now = pidleput(pp, now) now = pidleput(pp, now)
unlock(&sched.lock) unlock(&sched.lock)
@ -3631,7 +3631,7 @@ top:
if mp.spinning { if mp.spinning {
mp.spinning = false mp.spinning = false
if sched.nmspinning.Add(-1) < 0 { if sched.nmspinning.Add(-1) < 0 {
throw("findrunnable: negative nmspinning") throw("findRunnable: negative nmspinning")
} }
// Note the for correctness, only the last M transitioning from // Note the for correctness, only the last M transitioning from
@ -3704,10 +3704,10 @@ top:
if netpollinited() && (netpollAnyWaiters() || pollUntil != 0) && sched.lastpoll.Swap(0) != 0 { if netpollinited() && (netpollAnyWaiters() || pollUntil != 0) && sched.lastpoll.Swap(0) != 0 {
sched.pollUntil.Store(pollUntil) sched.pollUntil.Store(pollUntil)
if mp.p != 0 { if mp.p != 0 {
throw("findrunnable: netpoll with p") throw("findRunnable: netpoll with p")
} }
if mp.spinning { if mp.spinning {
throw("findrunnable: netpoll with spinning") throw("findRunnable: netpoll with spinning")
} }
delay := int64(-1) delay := int64(-1)
if pollUntil != 0 { if pollUntil != 0 {
@ -3973,7 +3973,7 @@ func checkIdleGCNoP() (*p, *g) {
// timers and the network poller if there isn't one already. // timers and the network poller if there isn't one already.
func wakeNetPoller(when int64) { func wakeNetPoller(when int64) {
if sched.lastpoll.Load() == 0 { if sched.lastpoll.Load() == 0 {
// In findrunnable we ensure that when polling the pollUntil // In findRunnable we ensure that when polling the pollUntil
// field is either zero or the time to which the current // field is either zero or the time to which the current
// poll is expected to run. This can have a spurious wakeup // poll is expected to run. This can have a spurious wakeup
// but should never miss a wakeup. // but should never miss a wakeup.
@ -3998,7 +3998,7 @@ func resetspinning() {
gp.m.spinning = false gp.m.spinning = false
nmspinning := sched.nmspinning.Add(-1) nmspinning := sched.nmspinning.Add(-1)
if nmspinning < 0 { if nmspinning < 0 {
throw("findrunnable: negative nmspinning") throw("findRunnable: negative nmspinning")
} }
// M wakeup policy is deliberately somewhat conservative, so check if we // M wakeup policy is deliberately somewhat conservative, so check if we
// need to wakeup another P here. See "Worker thread parking/unparking" // need to wakeup another P here. See "Worker thread parking/unparking"
@ -7269,7 +7269,7 @@ func pidlegetSpinning(now int64) (*p, int64) {
pp, now := pidleget(now) pp, now := pidleget(now)
if pp == nil { if pp == nil {
// See "Delicate dance" comment in findrunnable. We found work // See "Delicate dance" comment in findRunnable. We found work
// that we cannot take, we must synchronize with non-spinning // that we cannot take, we must synchronize with non-spinning
// Ms that may be preparing to drop their P. // Ms that may be preparing to drop their P.
sched.needspinning.Store(1) sched.needspinning.Store(1)

View file

@ -1425,9 +1425,9 @@ var (
// must be set. An idle P (passed to pidleput) cannot add new timers while // must be set. An idle P (passed to pidleput) cannot add new timers while
// idle, so if it has no timers at that time, its mask may be cleared. // idle, so if it has no timers at that time, its mask may be cleared.
// //
// Thus, we get the following effects on timer-stealing in findrunnable: // Thus, we get the following effects on timer-stealing in findRunnable:
// //
// - Idle Ps with no timers when they go idle are never checked in findrunnable // - Idle Ps with no timers when they go idle are never checked in findRunnable
// (for work- or timer-stealing; this is the ideal case). // (for work- or timer-stealing; this is the ideal case).
// - Running Ps must always be checked. // - Running Ps must always be checked.
// - Idle Ps whose timers are stolen must continue to be checked until they run // - Idle Ps whose timers are stolen must continue to be checked until they run