-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: preemptive scheduling #543
Labels
Milestone
Comments
Issue #4711 has been merged into this issue. |
Issue #5324 has been merged into this issue. |
There is a partial solution we can do for Go1.2 with few casualties. Namely, make gcwaiting variable per-M. Sysmon() thread detects when an M runs the same goroutine for a long time and sets m->gcwaiting. When a thread notices m->gcwaiting, it calls into scheduler. If global gcwaiting is not set, it just causes rescheduling. This way worker threads be preempted on chan/map/malloc operations. Owner changed to @dvyukov. |
Issue #5324 has been merged into this issue. |
The following change partially addresses the issue: https://golang.org/cl/10264044 runtime: preempt goroutines for GC The last patch for preemptive scheduler, with this change stoptheworld issues preemption requests every 100us. Update issue #543. |
This issue was updated by revision b913cf8. I believe the runtime is strong enough now to reenable preemption during the function prologue. Assuming this is or can be made stable, it will be in Go 1.2. More aggressive preemption is not planned for Go 1.2. R=golang-dev, iant CC=golang-dev https://golang.org/cl/11433045 |
This was referenced Dec 8, 2014
I think discussion moved to #10958. |
Thanks. I agree that everything remaining here is captured by #10958, so closing this one. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: