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

Issue 6273049: code review 6273049: runtime: introduce Processors (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by dvyukov
Modified:
11 years, 9 months ago
Reviewers:
Visibility:
Public.

Description

runtime: introduce Processors Introduce notion of P (Processors), there are exactly GOMAXPROCS Processors. Each M (Machine) has an associated P when executes Go code. Move MCache to P. Remove goroutine handoff (M.nextg). Remove the atomic scheduling word, use schedlock again. Handle locked goroutines and machines out of band. Locked goroutines are not put to runqueue, locked machines are not put to mhead. Performance become slightly worse: GOMAXPROCS=1 go test std old: 48.27s new: 49.33s GOMAXPROCS=16 go test std old: 52.69s new: 53.95s Tested: linux/darwin 386/amd64. Ultimately more resources will be moved to P (runqueue), each P will have own mutex, common operations will be able to proceed w/o global mutex.

Patch Set 1 #

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

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

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

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

Patch Set 6 : diff -r 98a72e834d58 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 7 : diff -r 4343da022009 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 8 : diff -r 4343da022009 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 9 : diff -r 4343da022009 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 10 : diff -r 4343da022009 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 11 : diff -r 4343da022009 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 12 : diff -r 4343da022009 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 13 : diff -r 4343da022009 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 14 : diff -r 4343da022009 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 15 : diff -r 4343da022009 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 16 : diff -r 042bac4d6b6e https://go.googlecode.com/hg/ #

Patch Set 17 : diff -r 042bac4d6b6e https://go.googlecode.com/hg/ #

Patch Set 18 : diff -r 329b9e54357f https://go.googlecode.com/hg/ #

Patch Set 19 : diff -r 329b9e54357f https://go.googlecode.com/hg/ #

Patch Set 20 : diff -r de27de6b4f6a https://go.googlecode.com/hg/ #

Patch Set 21 : diff -r de27de6b4f6a https://go.googlecode.com/hg/ #

Patch Set 22 : diff -r de27de6b4f6a https://go.googlecode.com/hg/ #

Patch Set 23 : diff -r 1baa0597a876 https://go.googlecode.com/hg/ #

Patch Set 24 : diff -r 1baa0597a876 https://go.googlecode.com/hg/ #

Patch Set 25 : diff -r 21130d62eeb0 https://go.googlecode.com/hg/ #

Patch Set 26 : diff -r 50000b87157d https://go.googlecode.com/hg/ #

Patch Set 27 : diff -r 50000b87157d https://go.googlecode.com/hg/ #

Patch Set 28 : diff -r 50000b87157d https://go.googlecode.com/hg/ #

Patch Set 29 : diff -r 50000b87157d https://go.googlecode.com/hg/ #

Patch Set 30 : diff -r 50000b87157d https://go.googlecode.com/hg/ #

Total comments: 15
Unified diffs Side-by-side diffs Delta from patch set Stats (+342 lines, -439 lines) Patch
M src/pkg/runtime/mgc0.c View 1 2 3 4 5 6 7 8 9 24 4 chunks +6 lines, -12 lines 0 comments Download
M src/pkg/runtime/proc.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 33 chunks +324 lines, -422 lines 15 comments Download
M src/pkg/runtime/runtime.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +12 lines, -5 lines 0 comments Download

Messages

Total messages: 9
dvyukov
Patch Set 7 is known to pass all.bash on Linux/Darwin 386/amd64.
11 years, 10 months ago (2012-07-01 12:36:39 UTC) #1
dvyukov
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 10 months ago (2012-07-04 18:36:31 UTC) #2
bpowers
I'm not super qualified, but had a couple of nits/questions. yours, Bobby http://codereview.appspot.com/6273049/diff/25010/src/pkg/runtime/proc.c File src/pkg/runtime/proc.c ...
11 years, 10 months ago (2012-07-05 19:01:04 UTC) #3
dvyukov
http://codereview.appspot.com/6273049/diff/25010/src/pkg/runtime/proc.c File src/pkg/runtime/proc.c (right): http://codereview.appspot.com/6273049/diff/25010/src/pkg/runtime/proc.c#newcode842 src/pkg/runtime/proc.c:842: schedunlock(); On 2012/07/05 19:01:04, bpowers wrote: > Is this ...
11 years, 10 months ago (2012-07-06 06:27:32 UTC) #4
dvyukov
FTR, I think current version (patch set 30) has problems with fairness. Since mreadylocked is ...
11 years, 10 months ago (2012-07-06 06:30:28 UTC) #5
DMorsing
This is the first time I've taken a thorough look at the go scheduler code, ...
11 years, 10 months ago (2012-07-06 16:43:13 UTC) #6
dvyukov
Thanks! I do not address code formatting/commenting comments, because I am still not sure about ...
11 years, 9 months ago (2012-08-05 10:47:11 UTC) #7
dvyukov
On 2012/08/05 10:47:11, dvyukov wrote: > Thanks! > > I do not address code formatting/commenting ...
11 years, 9 months ago (2012-08-06 13:45:38 UTC) #8
rsc
11 years, 9 months ago (2012-08-06 20:21:38 UTC) #9
removing reviewers
Sign in to reply to this message.

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