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

Issue 4657091: code review 4657091: runtime: eliminate contention during stack allocation (Closed)

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

Description

runtime: eliminate contention during stack allocation Standard-sized stack frames use plain malloc/free instead of centralized lock-protected FixAlloc. Benchmark results on HP Z600 (2 x Xeon E5620, 8 HT cores, 2.40GHz) are as follows: benchmark old ns/op new ns/op delta BenchmarkStackGrowth 1045.00 949.00 -9.19% BenchmarkStackGrowth-2 3450.00 800.00 -76.81% BenchmarkStackGrowth-4 5076.00 513.00 -89.89% BenchmarkStackGrowth-8 7805.00 471.00 -93.97% BenchmarkStackGrowth-16 11751.00 321.00 -97.27%

Patch Set 1 #

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

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

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

Patch Set 5 : diff -r 207a10acbc0f https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 207a10acbc0f https://go.googlecode.com/hg/ #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -39 lines) Patch
M src/pkg/runtime/malloc.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M src/pkg/runtime/malloc.goc View 1 2 3 4 3 chunks +20 lines, -30 lines 0 comments Download
M src/pkg/runtime/proc.c View 1 2 3 4 5 chunks +15 lines, -8 lines 1 comment Download
M src/pkg/runtime/proc_test.go View 1 2 chunks +29 lines, -0 lines 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M src/pkg/runtime/stack.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6
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/
13 years, 10 months ago (2011-07-11 12:46:51 UTC) #1
rsc
How does this change affect the benchmarks in test/garbage? I think I added the n ...
13 years, 10 months ago (2011-07-12 05:22:37 UTC) #2
dvyukov
Hello golang-dev@googlegroups.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 10 months ago (2011-07-12 10:00:14 UTC) #3
dvyukov
On 2011/07/12 05:22:37, rsc wrote: > How does this change affect the benchmarks > in ...
13 years, 10 months ago (2011-07-12 10:10:42 UTC) #4
rsc
LGTM
13 years, 10 months ago (2011-07-12 16:15:34 UTC) #5
rsc
13 years, 10 months ago (2011-07-12 16:24:35 UTC) #6
*** Submitted as 1ff2ce372ae3 ***

runtime: eliminate contention during stack allocation
Standard-sized stack frames use plain malloc/free
instead of centralized lock-protected FixAlloc.
Benchmark results on HP Z600 (2 x Xeon E5620, 8 HT cores, 2.40GHz)
are as follows:
benchmark                                        old ns/op    new ns/op    delta
BenchmarkStackGrowth                               1045.00       949.00   -9.19%
BenchmarkStackGrowth-2                             3450.00       800.00  -76.81%
BenchmarkStackGrowth-4                             5076.00       513.00  -89.89%
BenchmarkStackGrowth-8                             7805.00       471.00  -93.97%
BenchmarkStackGrowth-16                           11751.00       321.00  -97.27%

R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/4657091

Committer: Russ Cox <rsc@golang.org>

http://codereview.appspot.com/4657091/diff/21001/src/pkg/runtime/proc.c
File src/pkg/runtime/proc.c (right):

http://codereview.appspot.com/4657091/diff/21001/src/pkg/runtime/proc.c#newco...
src/pkg/runtime/proc.c:505: // Add to runtimeĀ·allm so garbage collector doesn't
free m
This comment should move with the code it describes.
Sign in to reply to this message.

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