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

Issue 42750044: code review 42750044: runtime: per-P defer pool (Closed)

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

Description

runtime: per-P defer pool Instead of a per-goroutine stack of defers for all sizes, introduce per-P defer pool for argument sizes 8, 24, 40, 56, 72 bytes. For a program that starts 1e6 goroutines and then joins then: old: rss=6.6g virtmem=10.2g time=4.85s new: rss=4.5g virtmem= 8.2g time=3.48s

Patch Set 1 #

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

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

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

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -109 lines) Patch
M src/pkg/runtime/cgocall.c View 1 2 chunks +0 lines, -2 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 1 chunk +16 lines, -7 lines 0 comments Download
M src/pkg/runtime/msize.c View 1 2 3 chunks +7 lines, -3 lines 0 comments Download
M src/pkg/runtime/panic.c View 1 2 3 5 chunks +72 lines, -86 lines 0 comments Download
M src/pkg/runtime/proc.c View 1 1 chunk +0 lines, -1 line 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 3 4 5 5 chunks +1 line, -10 lines 0 comments Download

Messages

Total messages: 4
dvyukov
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
10 years, 3 months ago (2013-12-31 09:53:18 UTC) #1
dvyukov
I've collected defer arg sizes during 'go test std', the bulk is 8, + there ...
10 years, 3 months ago (2013-12-31 09:55:39 UTC) #2
rsc
LGTM
10 years, 2 months ago (2014-01-09 21:25:24 UTC) #3
dvyukov
10 years, 2 months ago (2014-01-21 07:20:28 UTC) #4
*** Submitted as https://code.google.com/p/go/source/detail?r=a848bcb2adf7 ***

runtime: per-P defer pool
Instead of a per-goroutine stack of defers for all sizes,
introduce per-P defer pool for argument sizes 8, 24, 40, 56, 72 bytes.

For a program that starts 1e6 goroutines and then joins then:
old: rss=6.6g virtmem=10.2g time=4.85s
new: rss=4.5g virtmem= 8.2g time=3.48s

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

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