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

Issue 5279048: code review 5279048: runtime: faster and more scalable GC (Closed)

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

Description

runtime: faster and more scalable GC Serial improvements: free memory blocks in batches (sweep), some memory prefetching (mark+sweep). Parallel improvements: parallel for over root blocks (mark), parallel for over spans (sweep), lock-free stacks of free/full work blocks (mark). The CL brings unit testing into C runtime. Below are benchmarking results on 2 machines for test/garbage/parser. usr+sys time basically does grow between procs=2 and procs=4, while gc pause is basically halved and real time is decreased by 2m. For procs=8 usr+sys time starts growing and speedup is very modest. So the CL bumps Gcmaxprocs to 4. Last but not least, there is considerable single-threaded speedup. on 2 x Intel Xeon E5620 (2 processors x 4 HT cores), 2.4GHz, Linux procs usr sys usr+sys real pause1 ngc pause old 1 28.42 0.53 28.95 29.02 0.29 16 4.59 new 1 25.19 0.58 25.77 25.83 0.24 13 3.11 delta old/new -3.18 -3.19 -.11 old 2 29.90 0.66 30.56 25.31 0.19 14 2.63 new 2 26.90 0.54 27.44 23.71 0.13 14 1.82 delta old/new -3.12 -1.60 -.06 delta new/new1 +1.67 -2.12 -.09 old 4 30.83 0.82 31.65 22.92 0.10 15 1.44 new 4 27.05 0.62 27.67 21.64 0.07 14 0.96 delta old/new -3.18 -0.87 -.04 delta new/new1 +1.90 -4.19 -.15 old 8 33.76 2.28 36.04 22.29 0.07 15 1.10 new 8 29.64 1.00 30.64 21.28 0.04 15 0.66 delta old/new -5.40 -1.01 -.03 delta new/new1 +4.87 -4.55 -.16 on Intel Core2 Penryn (2 cores), 2.1GHz, Darwin procs usr sys usr+sys real pause1 ngc pause old 1 37.37 2.03 39.40 40.98 0.39 14 5.01 new 1 35.37 2.02 37.39 38.98 0.29 15 4.43 delta old/new -2.01 -2.00 -.10 old 2 40.60 2.09 42.69 37.87 0.27 14 3.16 new 2 39.54 2.05 41.59 37.16 0.17 17 2.81 delta old/new -1.01 -0.70 -.10 delta new/new1 +4.20 -1.82 -.12

Patch Set 1 #

Patch Set 2 : diff -r 9e73a59f386c https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 9e73a59f386c https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r f2c5fe09f2ce https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 99ea0887e633 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 60d08510dc91 https://go.googlecode.com/hg/ #

Patch Set 7 : diff -r 60d08510dc91 https://go.googlecode.com/hg/ #

Patch Set 8 : diff -r 60d08510dc91 https://go.googlecode.com/hg/ #

Patch Set 9 : diff -r 9fac03822c60 https://go.googlecode.com/hg/ #

Patch Set 10 : diff -r 8c16afe28b0e https://go.googlecode.com/hg/ #

Patch Set 11 : diff -r dca37ec4ec50 https://go.googlecode.com/hg/ #

Patch Set 12 : diff -r dca37ec4ec50 https://go.googlecode.com/hg/ #

Patch Set 13 : diff -r dca37ec4ec50 https://go.googlecode.com/hg/ #

Patch Set 14 : diff -r da9e7548e6ef https://go.googlecode.com/hg/ #

Patch Set 15 : diff -r da9e7548e6ef https://go.googlecode.com/hg/ #

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Patch Set 31 : diff -r 4382717b7ffc https://go.googlecode.com/hg/ #

Patch Set 32 : diff -r fe7ee6bb723f https://go.googlecode.com/hg/ #

Patch Set 33 : diff -r fe7ee6bb723f https://go.googlecode.com/hg/ #

Patch Set 34 : diff -r fe7ee6bb723f https://go.googlecode.com/hg/ #

Patch Set 35 : diff -r fe7ee6bb723f https://go.googlecode.com/hg/ #

Patch Set 36 : diff -r fe7ee6bb723f https://go.googlecode.com/hg/ #

Patch Set 37 : diff -r fe7ee6bb723f https://go.googlecode.com/hg/ #

Patch Set 38 : diff -r fe7ee6bb723f https://go.googlecode.com/hg/ #

Patch Set 39 : diff -r fe7ee6bb723f https://go.googlecode.com/hg/ #

Patch Set 40 : diff -r fd80a4497037 https://go.googlecode.com/hg/ #

Patch Set 41 : diff -r fd80a4497037 https://go.googlecode.com/hg/ #

Patch Set 42 : diff -r fd80a4497037 https://go.googlecode.com/hg/ #

Patch Set 43 : diff -r fd80a4497037 https://go.googlecode.com/hg/ #

Patch Set 44 : diff -r fd80a4497037 https://go.googlecode.com/hg/ #

Patch Set 45 : diff -r fd80a4497037 https://go.googlecode.com/hg/ #

Patch Set 46 : diff -r fd80a4497037 https://go.googlecode.com/hg/ #

Patch Set 47 : diff -r 4a5b249ef23d https://go.googlecode.com/hg/ #

Patch Set 48 : diff -r 4a5b249ef23d https://go.googlecode.com/hg/ #

Patch Set 49 : diff -r 4a5b249ef23d https://go.googlecode.com/hg/ #

Total comments: 7

Patch Set 50 : diff -r 4a5b249ef23d https://go.googlecode.com/hg/ #

Patch Set 51 : diff -r 4b38f89d933d https://go.googlecode.com/hg/ #

Patch Set 52 : diff -r 4b38f89d933d https://go.googlecode.com/hg/ #

Patch Set 53 : diff -r f624d7f32d22 https://go.googlecode.com/hg/ #

Patch Set 54 : diff -r f624d7f32d22 https://go.googlecode.com/hg/ #

Patch Set 55 : diff -r f1d4817915e2 https://go.googlecode.com/hg/ #

Patch Set 56 : diff -r ae5cbf194da1 https://go.googlecode.com/hg/ #

Patch Set 57 : diff -r 57956dacf262 https://go.googlecode.com/hg/ #

Patch Set 58 : diff -r 57956dacf262 https://go.googlecode.com/hg/ #

Patch Set 59 : diff -r 57956dacf262 https://go.googlecode.com/hg/ #

Patch Set 60 : diff -r f44057cc01b2 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1341 lines, -346 lines) Patch
M src/pkg/runtime/arch_386.h 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 1 chunk +4 lines, -0 lines 0 comments Download
M src/pkg/runtime/arch_amd64.h 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 1 chunk +4 lines, -0 lines 0 comments Download
A src/pkg/runtime/arm/arch.h 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 1 chunk +6 lines, -0 lines 0 comments Download
A src/pkg/runtime/arm/atomic.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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 1 chunk +143 lines, -0 lines 0 comments Download
M src/pkg/runtime/asm_386.s 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 2 chunks +64 lines, -0 lines 0 comments Download
M src/pkg/runtime/asm_amd64.s 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 3 chunks +45 lines, -0 lines 0 comments Download
M src/pkg/runtime/atomic_386.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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 1 chunk +11 lines, -0 lines 0 comments Download
M src/pkg/runtime/atomic_amd64.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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 1 chunk +7 lines, -0 lines 0 comments Download
M src/pkg/runtime/export_test.go 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 1 chunk +9 lines, -0 lines 0 comments Download
M src/pkg/runtime/malloc.h 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 4 chunks +9 lines, -3 lines 0 comments Download
M src/pkg/runtime/mcache.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 28 1 chunk +0 lines, -5 lines 0 comments Download
M src/pkg/runtime/mcentral.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 2 chunks +36 lines, -3 lines 0 comments Download
M src/pkg/runtime/mgc0.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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 25 chunks +774 lines, -303 lines 0 comments Download
M src/pkg/runtime/mheap.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 1 chunk +16 lines, -3 lines 0 comments Download
M src/pkg/runtime/mprof.goc 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 2 chunks +2 lines, -2 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 3 chunks +113 lines, -25 lines 0 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 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 5 chunks +18 lines, -2 lines 0 comments Download
M src/pkg/runtime/runtime.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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 1 chunk +28 lines, -0 lines 0 comments Download
M src/pkg/runtime/runtime_test.go 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 2 chunks +52 lines, -0 lines 0 comments Download

Messages

Total messages: 24
dvyukov
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 5 months ago (2011-11-21 17:30:32 UTC) #1
rsc
Thanks. It would certainly have been nice to know this was coming. This is a ...
12 years, 5 months ago (2011-11-21 21:55:36 UTC) #2
dvyukov
On 2011/11/21 21:55:36, rsc wrote: > Thanks. > > It would certainly have been nice ...
12 years, 5 months ago (2011-11-22 09:12:41 UTC) #3
dvyukov
test/bench/binary-tree -n=17 procs old,s new,s delta 1 9.29 8.13 -12% 2 9.07 7.15 -21% 4 ...
12 years, 5 months ago (2011-11-22 09:18:40 UTC) #4
rsc
On Tue, Nov 22, 2011 at 04:12, <dvyukov@google.com> wrote: > What is the problem with ...
12 years, 5 months ago (2011-11-22 13:38:12 UTC) #5
dvyukov
On Tue, Nov 22, 2011 at 5:38 PM, Russ Cox <rsc@golang.org> wrote: > On Tue, ...
12 years, 5 months ago (2011-11-22 13:48:48 UTC) #6
rsc
On the 386 I don't mind requiring the 64-bit atomics. It is mainly the ARM ...
12 years, 5 months ago (2011-11-22 13:57:07 UTC) #7
dvyukov
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 5 months ago (2011-11-23 15:30:17 UTC) #8
dvyukov
On 2011/11/23 15:30:17, dvyukov wrote: > Hello mailto:rsc@golang.org (cc: mailto:golang-dev@googlegroups.com), > > Please take another ...
12 years, 5 months ago (2011-11-23 15:36:44 UTC) #9
dvyukov
On 2011/11/22 09:18:40, dvyukov wrote: > test/bench/binary-tree -n=17 > procs old,s new,s delta > 1 ...
12 years, 5 months ago (2011-11-23 15:39:19 UTC) #10
dvyukov
On 2011/11/22 09:18:40, dvyukov wrote: > test/bench/binary-tree -n=17 > procs old,s new,s delta > 1 ...
12 years, 5 months ago (2011-11-23 15:41:09 UTC) #11
fw
> I've replaced LDREXD/STREXD with locktable emulation. Not ideal > performance-wise, but should do. > ...
12 years, 5 months ago (2011-11-23 20:27:33 UTC) #12
dvyukov
On 2011/11/23 20:27:33, fw_deneb.enyo.de wrote: > > I've replaced LDREXD/STREXD with locktable emulation. Not ideal ...
12 years, 5 months ago (2011-11-25 11:22:34 UTC) #13
lucio
Deary, deary me! In the old days these would all be reserved instructions not available ...
12 years, 5 months ago (2011-11-25 12:35:53 UTC) #14
rsc
Hi. I would like to move forward with this, but the CL is too big. ...
12 years, 1 month ago (2012-04-04 15:09:43 UTC) #15
dvyukov
On Wed, Apr 4, 2012 at 7:09 PM, <rsc@golang.org> wrote: > Hi. > > I ...
12 years, 1 month ago (2012-04-04 15:39:34 UTC) #16
dvyukov
On 2012/04/04 15:09:43, rsc wrote: > Hi. > > I would like to move forward ...
12 years, 1 month ago (2012-04-05 04:24:31 UTC) #17
dvyukov
On 2012/04/04 15:09:43, rsc wrote: > Hi. > > I would like to move forward ...
12 years, 1 month ago (2012-04-05 04:24:34 UTC) #18
dvyukov
FTR, the atomic part of this CL is moved out to: http://codereview.appspot.com/5985047
12 years, 1 month ago (2012-04-05 14:13:58 UTC) #19
dvyukov
On 2012/04/05 14:13:58, dvyukov wrote: > FTR, the atomic part of this CL is moved ...
12 years, 1 month ago (2012-04-05 14:21:08 UTC) #20
dvyukov
On 2012/04/05 04:24:31, dvyukov wrote: > On 2012/04/04 15:09:43, rsc wrote: > > Hi. > ...
12 years, 1 month ago (2012-04-05 17:01:38 UTC) #21
rsc
Can you put the C testing stuff in _test.c files? Russ
12 years, 1 month ago (2012-04-05 17:02:49 UTC) #22
rsc
On Thu, Apr 5, 2012 at 13:02, Russ Cox <rsc@golang.org> wrote: > Can you put ...
12 years, 1 month ago (2012-04-05 17:03:35 UTC) #23
rsc
11 years, 11 months ago (2012-06-03 04:59:12 UTC) #24

          
Sign in to reply to this message.

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