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

Issue 7310094: code review 7310094: runtime: Do not reserve huge amount of swap on 32 bit a... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 5 months ago by snabb
Modified:
13 years, 5 months ago
Reviewers:
CC:
golang-dev, minux1, iant, dave_cheney.net, gofrontend-dev_googlegroups.com
Visibility:
Public.

Description

runtime: Do not reserve huge amount of swap on 32 bit architectures. The mmap() call which reserves the arena should have MAP_NORESERVE flag as in typical cases this memory will never be (fully) needed. This matters in environments which do not do Linux style memory overcommit, such as OpenIndiana/OpenSolaris/Solaris. The MAP_NORESERVE flag does not exist on all operating systems (for example FreeBSD). Therefore we define it to zero value in case it does not exist. Fixes issue 21.

Patch Set 1 #

Patch Set 2 : diff -r e1872b6db171 https://code.google.com/p/gofrontend/ #

Patch Set 3 : diff -r e1872b6db171 https://code.google.com/p/gofrontend/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -1 line) Patch
M libgo/runtime/mem.c View 1 2 chunks +9 lines, -1 line 0 comments Download

Messages

Total messages: 9
snabb
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/gofrontend/
13 years, 5 months ago (2013-02-14 15:52:58 UTC) #1
minux1
please send gccgo CLs to the gofrontend-dev ML. i think we'd better patch this to ...
13 years, 5 months ago (2013-02-14 16:52:48 UTC) #2
snabb
On 2013-02-14 18:52, minux wrote: > please send gccgo CLs to the gofrontend-dev ML. Oops, ...
13 years, 5 months ago (2013-02-14 17:16:08 UTC) #3
iant
On 2013/02/14 17:16:08, snabb wrote: > > I tried this out on 32 bit Linux ...
13 years, 5 months ago (2013-02-14 17:35:33 UTC) #4
snabb
On 2013-02-14 19:35, iant@golang.org wrote: > Given that we don't need MAP_NORESERVE on GNU/Linux, I'm ...
13 years, 5 months ago (2013-02-14 20:00:32 UTC) #5
dave_cheney.net
I think this CL has merit, the common problems with running Go or Java on ...
13 years, 5 months ago (2013-02-14 20:05:49 UTC) #6
snabb
On 2013-02-14 22:05, Dave Cheney wrote: > I think this CL has merit, the common ...
13 years, 5 months ago (2013-02-15 04:23:13 UTC) #7
iant
LGTM
13 years, 5 months ago (2013-02-15 18:54:38 UTC) #8
iant
13 years, 5 months ago (2013-02-15 18:54:54 UTC) #9
*** Submitted as
https://code.google.com/p/gofrontend/source/detail?r=29b742a2ed37 ***

runtime: Do not reserve huge amount of swap on 32 bit architectures.

The mmap() call which reserves the arena should have MAP_NORESERVE
flag as in typical cases this memory will never be (fully) needed.
This matters in environments which do not do Linux style memory
overcommit, such as OpenIndiana/OpenSolaris/Solaris.

The MAP_NORESERVE flag does not exist on all operating systems
(for example FreeBSD). Therefore we define it to zero value in
case it does not exist.

Fixes issue 21.

R=golang-dev, minux.ma, iant, dave
CC=gofrontend-dev, golang-dev
https://codereview.appspot.com/7310094

Committer: Ian Lance Taylor <iant@golang.org>
Sign in to reply to this message.

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