Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(594)

Issue 12167043: code review 12167043: runtime: do not park sysmon thread if any goroutines ar... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by dvyukov
Modified:
11 years, 8 months ago
Reviewers:
rsc
CC:
golang-dev, rsc
Visibility:
Public.

Description

runtime: do not park sysmon thread if any goroutines are running Sysmon thread parks if no goroutines are running (runtime.sched.npidle == runtime.gomaxprocs). Currently it's unparked when a goroutine enters syscall, it was enough to retake P's from blocking syscalls. But it's not enough for reliable goroutine preemption. We need to ensure that sysmon runs if any goroutines are running.

Patch Set 1 #

Patch Set 2 : diff -r d39481d8010a https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r d39481d8010a https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r d39481d8010a https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 5 : diff -r d39481d8010a https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -4 lines) Patch
M src/pkg/runtime/proc.c View 1 2 3 4 3 chunks +26 lines, -4 lines 0 comments Download

Messages

Total messages: 5
dvyukov
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
11 years, 8 months ago (2013-07-31 14:18:52 UTC) #1
dvyukov
This is the piece I forgot to move from my original preemption patch: https://codereview.appspot.com/9136045/diff/28002/src/pkg/runtime/proc.c
11 years, 8 months ago (2013-07-31 14:19:34 UTC) #2
rsc
LGTM Is that really a non-atomic swap? Will it mean multiple notewakeup calls? Does that ...
11 years, 8 months ago (2013-07-31 15:27:34 UTC) #3
dvyukov
On 2013/07/31 15:27:34, rsc wrote: > LGTM > > Is that really a non-atomic swap? ...
11 years, 8 months ago (2013-07-31 15:59:49 UTC) #4
dvyukov
11 years, 8 months ago (2013-07-31 16:00:06 UTC) #5
*** Submitted as https://code.google.com/p/go/source/detail?r=475e11851fc1 ***

runtime: do not park sysmon thread if any goroutines are running
Sysmon thread parks if no goroutines are running (runtime.sched.npidle ==
runtime.gomaxprocs).
Currently it's unparked when a goroutine enters syscall, it was enough
to retake P's from blocking syscalls.
But it's not enough for reliable goroutine preemption. We need to ensure that
sysmon runs if any goroutines are running.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/12167043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b