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

Issue 6850081: code review 6850081: runtime: implement runtime.SysUnused on FreeBSD (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by jgc
Modified:
11 years, 4 months ago
Reviewers:
dfc
CC:
golang-dev, mikio, jgc_jgc.org, minux1
Visibility:
Public.

Description

runtime: implement runtime.SysUnused on FreeBSD madvise was missing so implement it in assembler. This change needs to be extended to the other BSD variantes (Net and Open) Without this change the scavenger will attempt to pass memory back to the operating system when it has become idle, but the memory is not returned and for long running Go processes the total memory used can grow until OOM occurs. I have only been able to test the code on FreeBSD AMD64. The ARM platforms needs testing.

Patch Set 1 #

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

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

Total comments: 3

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

Total comments: 1

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -5 lines) Patch
M src/pkg/runtime/defs_freebsd.go View 1 2 3 4 2 chunks +5 lines, -2 lines 0 comments Download
M src/pkg/runtime/defs_freebsd_386.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/defs_freebsd_amd64.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/defs_freebsd_arm.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/mem_freebsd.c View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M src/pkg/runtime/sys_freebsd_386.s View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M src/pkg/runtime/sys_freebsd_amd64.s View 1 1 chunk +11 lines, -0 lines 0 comments Download
M src/pkg/runtime/sys_freebsd_arm.s View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 21
jgc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
11 years, 5 months ago (2012-11-20 20:52:05 UTC) #1
mikio
Perhaps CL description would be "runtime: madvise and SysUnused for FreeBSD" like CL 5531073. Can ...
11 years, 5 months ago (2012-11-21 00:33:14 UTC) #2
dfc
Here is the freebsd/arm version, you can import it into your CL with cd $GOROOT/src/pkg/runtime ...
11 years, 5 months ago (2012-11-21 01:27:39 UTC) #3
dfc
> please regenerate this file with: > GOARCH=amd64 go tool cgo -cdefs defs_freebsd.go >defs_freebsd_amd64.h I ...
11 years, 5 months ago (2012-11-21 01:30:02 UTC) #4
dfc
https://codereview.appspot.com/6854077 should work for freebsd/386. Just a note about the description. Without this change the ...
11 years, 5 months ago (2012-11-21 01:45:08 UTC) #5
jgc
Hello golang-dev@googlegroups.com, mikioh.mikioh@gmail.com, dave@cheney.net (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 5 months ago (2012-11-22 10:55:04 UTC) #6
dfc
LGTM. Thank you. Hopefully Mikio or Minux can check freebsd/386 and freebsd/arm. John, while you're ...
11 years, 5 months ago (2012-11-22 11:05:02 UTC) #7
jgc_jgc.org
On Thu, Nov 22, 2012 at 11:05 AM, <dave@cheney.net> wrote: > LGTM. Thank you. > ...
11 years, 5 months ago (2012-11-22 11:10:46 UTC) #8
mikio
Please change the CL description to: runtime: implement madvise and SysUnused for FreeBSD. It passes ...
11 years, 4 months ago (2012-11-23 05:38:54 UTC) #9
dfc
Mikio, I think we should regenerate these files in a follow up CL, are you ...
11 years, 4 months ago (2012-11-23 06:17:48 UTC) #10
mikio
On Fri, Nov 23, 2012 at 3:17 PM, Dave Cheney <dave@cheney.net> wrote: > Mikio, I ...
11 years, 4 months ago (2012-11-23 06:26:55 UTC) #11
jgc_jgc.org
On Fri, Nov 23, 2012 at 5:38 AM, <mikioh.mikioh@gmail.com> wrote: > Please change the CL ...
11 years, 4 months ago (2012-11-23 09:31:08 UTC) #12
jgc
Hello golang-dev@googlegroups.com, mikioh.mikioh@gmail.com, dave@cheney.net, jgc@jgc.org, minux.ma@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 4 months ago (2012-11-23 09:31:59 UTC) #13
dfc
I can vouch for arm. If it is wrong I'll address it when we get ...
11 years, 4 months ago (2012-11-23 09:38:02 UTC) #14
minux1
I'm testing on emulated FreeBSD/arm. Will take quite some time.
11 years, 4 months ago (2012-11-23 09:47:34 UTC) #15
mikio
On Fri, Nov 23, 2012 at 3:17 PM, Dave Cheney <dave@cheney.net> wrote: > Mikio, I ...
11 years, 4 months ago (2012-11-23 10:07:31 UTC) #16
minux1
LGTM on FreeBSD/ARM.
11 years, 4 months ago (2012-11-23 11:26:15 UTC) #17
dfc
*** Submitted as http://code.google.com/p/go/source/detail?r=40ffcafb291e *** runtime: implement runtime.SysUnused on FreeBSD madvise was missing so implement ...
11 years, 4 months ago (2012-11-24 04:55:26 UTC) #18
dfc
Thanks John. If possible, please keep the mailing list in the loop as to the ...
11 years, 4 months ago (2012-11-24 05:40:52 UTC) #19
jgc
I will. Once this is in the tip it will be deployed and tested. John. ...
11 years, 4 months ago (2012-11-24 09:07:22 UTC) #20
minux1
11 years, 4 months ago (2012-11-24 09:12:20 UTC) #21
On Sat, Nov 24, 2012 at 5:07 PM, John Graham-Cumming <jgrahamc@gmail.com>wrote:

> I will. Once this is in the tip it will be deployed and tested.
>
FYI, This CL is already submitted to the default branch.
Sign in to reply to this message.

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