Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: should use nmidle replace npidle in handoffp #63608

Closed
j2gg0s opened this issue Oct 18, 2023 · 1 comment
Closed

runtime: should use nmidle replace npidle in handoffp #63608

j2gg0s opened this issue Oct 18, 2023 · 1 comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.

Comments

@j2gg0s
Copy link
Contributor

j2gg0s commented Oct 18, 2023

https://github.com/golang/go/blob/master/src/runtime/proc.go#L2664

	// no local work, check that there are no spinning/idle M's,
	// otherwise our help is not required
	if sched.nmspinning.Load()+sched.npidle.Load() == 0 && sched.nmspinning.CompareAndSwap(0, 1) { // TODO: fast atomic
		sched.needspinning.Store(0)
		startm(pp, true, false)
		return
	}

If we want to check idle M, why use npidle?
A typo?

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Oct 18, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/536119 mentions this issue: compiler/runtime: fix nmidle in handoffp

@j2gg0s j2gg0s closed this as completed Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants