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

Issue 92540043: code review 92540043: runtime: switch default stack size back to 8kB (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by rsc
Modified:
11 years, 4 months ago
Reviewers:
dave, khr1, iant
CC:
iant, khr, r, khr1, bradfitz, dave_cheney.net, golang-codereviews
Visibility:
Public.

Description

runtime: switch default stack size back to 8kB The move from 4kB to 8kB in Go 1.2 was to eliminate many stack split hot spots. The move back to 4kB was predicated on copying stacks eliminating the potential for hot spots. Unfortunately, the fact that stacks do not copy 100% of the time means that hot spots can still happen under the right conditions, and the slowdown is worse now than it was in Go 1.2. There is a real program in issue 8030 that sees about a 30x slowdown: it has a reflect call near the top of the stack which inhibits any stack copying on that segment. Go back to 8kB until stack copying can be used 100% of the time. Fixes issue 8030.

Patch Set 1 #

Patch Set 2 : diff -r 5b9ac653acf6 https://code.google.com/p/go/ #

Patch Set 3 : diff -r 5b9ac653acf6 https://code.google.com/p/go/ #

Patch Set 4 : diff -r 5b9ac653acf6 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -8 lines) Patch
M doc/go1.3.html View 1 1 chunk +0 lines, -7 lines 0 comments Download
M src/pkg/runtime/stack.h View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6
rsc
Hello iant, khr, r (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
11 years, 4 months ago (2014-05-20 03:46:34 UTC) #1
khr1
LGTM. On Mon, May 19, 2014 at 8:46 PM, <rsc@golang.org> wrote: > Reviewers: iant, khr, ...
11 years, 4 months ago (2014-05-20 03:48:05 UTC) #2
bradfitz
Bummer. On May 19, 2014 8:46 PM, <rsc@golang.org> wrote: > Reviewers: iant, khr, r, > ...
11 years, 4 months ago (2014-05-20 03:55:04 UTC) #3
dave_cheney.net
LGTM. On Tue, May 20, 2014 at 1:48 PM, 'Keith Randall' via golang-codereviews <golang-codereviews@googlegroups.com> wrote: ...
11 years, 4 months ago (2014-05-20 03:57:24 UTC) #4
iant
LGTM
11 years, 4 months ago (2014-05-20 04:29:05 UTC) #5
rsc
11 years, 4 months ago (2014-05-20 04:30:46 UTC) #6
*** Submitted as https://code.google.com/p/go/source/detail?r=8979b6d0163f ***

runtime: switch default stack size back to 8kB

The move from 4kB to 8kB in Go 1.2 was to eliminate many stack split hot spots.

The move back to 4kB was predicated on copying stacks eliminating
the potential for hot spots.

Unfortunately, the fact that stacks do not copy 100% of the time means
that hot spots can still happen under the right conditions, and the slowdown
is worse now than it was in Go 1.2. There is a real program in issue 8030 that
sees about a 30x slowdown: it has a reflect call near the top of the stack
which inhibits any stack copying on that segment.

Go back to 8kB until stack copying can be used 100% of the time.

Fixes issue 8030.

LGTM=khr, dave, iant
R=iant, khr, r, bradfitz, dave
CC=golang-codereviews
https://codereview.appspot.com/92540043
Sign in to reply to this message.

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