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

Issue 4536076: code review 4536076: net: Sendfile for win32. (Closed)

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

Description

net: Sendfile for win32. implement using TransmitFile().

Patch Set 1 #

Patch Set 2 : diff -r b683b10bb780 http://go.googlecode.com/hg/ #

Total comments: 22

Patch Set 3 : diff -r b683b10bb780 http://go.googlecode.com/hg/ #

Patch Set 4 : diff -r b683b10bb780 http://go.googlecode.com/hg/ #

Patch Set 5 : diff -r b683b10bb780 http://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 2d3e41aeb1b3 http://go.googlecode.com/hg/ #

Patch Set 7 : diff -r 96fb12b2040e http://go.googlecode.com/hg/ #

Patch Set 8 : diff -r 96fb12b2040e http://go.googlecode.com/hg/ #

Patch Set 9 : diff -r 96fb12b2040e http://go.googlecode.com/hg/ #

Total comments: 8

Patch Set 10 : diff -r 240a35ed76a2 http://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 11 : diff -r 240a35ed76a2 http://go.googlecode.com/hg/ #

Patch Set 12 : diff -r 240a35ed76a2 http://go.googlecode.com/hg/ #

Total comments: 4

Patch Set 13 : diff -r 240a35ed76a2 http://go.googlecode.com/hg/ #

Total comments: 7

Patch Set 14 : diff -r 7358615f596c http://go.googlecode.com/hg/ #

Total comments: 5

Patch Set 15 : diff -r 7358615f596c http://go.googlecode.com/hg/ #

Patch Set 16 : diff -r 7358615f596c http://go.googlecode.com/hg/ #

Patch Set 17 : diff -r 7358615f596c http://go.googlecode.com/hg/ #

Patch Set 18 : diff -r 7358615f596c http://go.googlecode.com/hg/ #

Patch Set 19 : diff -r 7358615f596c http://go.googlecode.com/hg/ #

Total comments: 4

Patch Set 20 : diff -r 7358615f596c http://go.googlecode.com/hg/ #

Patch Set 21 : diff -r 7358615f596c http://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -1 line) Patch
M src/pkg/net/Makefile View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
A src/pkg/net/sendfile_windows.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +68 lines, -0 lines 0 comments Download
M src/pkg/syscall/syscall_windows.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/syscall/zsyscall_windows_386.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +15 lines, -0 lines 0 comments Download
M src/pkg/syscall/ztypes_windows_386.go View 1 7 8 9 10 11 12 13 14 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 50
mattn
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to http://go.googlecode.com/hg/
13 years, 10 months ago (2011-05-23 10:53:36 UTC) #1
bsiegert
http://codereview.appspot.com/4536076/diff/2001/src/pkg/syscall/syscall_windows.go File src/pkg/syscall/syscall_windows.go (right): http://codereview.appspot.com/4536076/diff/2001/src/pkg/syscall/syscall_windows.go#newcode117 src/pkg/syscall/syscall_windows.go:117: var bytesToWrite uint32 var n uint32
13 years, 10 months ago (2011-05-23 13:41:30 UTC) #2
bradfitz
http://codereview.appspot.com/4536076/diff/2001/src/pkg/syscall/syscall_windows.go File src/pkg/syscall/syscall_windows.go (right): http://codereview.appspot.com/4536076/diff/2001/src/pkg/syscall/syscall_windows.go#newcode108 src/pkg/syscall/syscall_windows.go:108: _, e := Seek(infd, *offset, 0) this Seek has ...
13 years, 10 months ago (2011-05-23 16:10:51 UTC) #3
brainman
Sorry, quite a few comments. http://codereview.appspot.com/4536076/diff/2001/src/pkg/syscall/syscall_windows.go File src/pkg/syscall/syscall_windows.go (left): http://codereview.appspot.com/4536076/diff/2001/src/pkg/syscall/syscall_windows.go#oldcode106 src/pkg/syscall/syscall_windows.go:106: func Sendfile(outfd int, infd ...
13 years, 10 months ago (2011-05-24 00:29:22 UTC) #4
mattn
Hello golang-dev@googlegroups.com, bsiegert@gmail.com, bradfitz@golang.org, alex.brainman@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 10 months ago (2011-05-24 01:36:32 UTC) #5
mattn
http://codereview.appspot.com/4536076/diff/2001/src/pkg/syscall/syscall_windows.go File src/pkg/syscall/syscall_windows.go (left): http://codereview.appspot.com/4536076/diff/2001/src/pkg/syscall/syscall_windows.go#oldcode106 src/pkg/syscall/syscall_windows.go:106: func Sendfile(outfd int, infd int, offset *int64, count int) ...
13 years, 10 months ago (2011-05-24 01:37:45 UTC) #6
bradfitz
Note that if we end up going with something like this latest sendfile version: http://codereview.appspot.com/4538088/ ...
13 years, 10 months ago (2011-05-24 01:39:59 UTC) #7
brainman
On 2011/05/24 01:39:59, bradfitz wrote: > > But please continue to hold on this until ...
13 years, 10 months ago (2011-05-24 01:45:05 UTC) #8
bradfitz
Linux sendfile is in: http://code.google.com/p/go/source/detail?r=535caa895f21 If you guys want to do this for Windows: * ...
13 years, 10 months ago (2011-05-25 17:22:39 UTC) #9
mattn
Hello golang-dev@googlegroups.com, bsiegert@gmail.com, bradfitz@golang.org, alex.brainman@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 10 months ago (2011-05-26 08:33:08 UTC) #10
bradfitz
http://codereview.appspot.com/4536076/diff/9004/src/pkg/net/fd_windows.go File src/pkg/net/fd_windows.go (right): http://codereview.appspot.com/4536076/diff/9004/src/pkg/net/fd_windows.go#newcode112 src/pkg/net/fd_windows.go:112: if rc := (*anOp)(unsafe.Pointer(o)).resultc; rc != nil { I ...
13 years, 10 months ago (2011-05-26 13:59:28 UTC) #11
bradfitz
Any CPU usage numbers before/after? On Thu, May 26, 2011 at 1:41 AM, mattn <mattn.jp@gmail.com> ...
13 years, 10 months ago (2011-05-26 14:00:23 UTC) #12
bradfitz
I find poor machines the most fun & rewarding to benchmark on. :-) On Thu, ...
13 years, 10 months ago (2011-05-27 00:22:08 UTC) #13
mattn
Thanks for your reviews. http://codereview.appspot.com/4536076/diff/9004/src/pkg/net/fd_windows.go File src/pkg/net/fd_windows.go (right): http://codereview.appspot.com/4536076/diff/9004/src/pkg/net/fd_windows.go#newcode112 src/pkg/net/fd_windows.go:112: if rc := (*anOp)(unsafe.Pointer(o)).resultc; rc ...
13 years, 10 months ago (2011-05-27 00:37:02 UTC) #14
brainman
On 2011/05/27 00:37:02, mattn wrote: > Sometimes, I got 'receive from nil channel' panic. > ...
13 years, 10 months ago (2011-05-27 03:09:03 UTC) #15
brainman
On 2011/05/27 00:22:08, bradfitz wrote: > I find poor machines the most fun & rewarding ...
13 years, 10 months ago (2011-06-01 07:37:51 UTC) #16
bradfitz
On Wed, Jun 1, 2011 at 1:20 AM, mattn <mattn.jp@gmail.com> wrote: > A "ImageMagick-i686-pc-mingw32.tar" is ...
13 years, 10 months ago (2011-06-01 14:11:40 UTC) #17
brainman
On 2011/06/01 14:11:40, bradfitz wrote: > > You want to look at CPU usage more ...
13 years, 10 months ago (2011-06-02 03:35:16 UTC) #18
bradfitz
On Wed, Jun 1, 2011 at 8:35 PM, <alex.brainman@gmail.com> wrote: > On 2011/06/01 14:11:40, bradfitz ...
13 years, 10 months ago (2011-06-02 04:49:30 UTC) #19
brainman
On 2011/06/02 04:49:30, bradfitz wrote: > > looks like the latest CL has some "Done!" ...
13 years, 10 months ago (2011-06-02 05:12:36 UTC) #20
bradfitz
http://codereview.appspot.com/4536076/diff/6008/src/pkg/net/fd_windows.go File src/pkg/net/fd_windows.go (right): http://codereview.appspot.com/4536076/diff/6008/src/pkg/net/fd_windows.go#newcode112 src/pkg/net/fd_windows.go:112: if rc := (*anOp)(unsafe.Pointer(o)).resultc; rc != nil { this ...
13 years, 10 months ago (2011-06-02 05:14:26 UTC) #21
mattn
http://codereview.appspot.com/4536076/diff/6008/src/pkg/net/fd_windows.go File src/pkg/net/fd_windows.go (right): http://codereview.appspot.com/4536076/diff/6008/src/pkg/net/fd_windows.go#newcode112 src/pkg/net/fd_windows.go:112: if rc := (*anOp)(unsafe.Pointer(o)).resultc; rc != nil { I ...
13 years, 10 months ago (2011-06-02 05:43:34 UTC) #22
brainman
On 2011/06/02 05:43:34, mattn wrote: > > brainman, have I mis-understanding? > I don't know ...
13 years, 10 months ago (2011-06-02 06:03:08 UTC) #23
mattn
On 2011/06/02 06:03:08, brainman wrote: > On 2011/06/02 05:43:34, mattn wrote: > > > > ...
13 years, 10 months ago (2011-06-02 06:32:46 UTC) #24
brainman
On 2011/06/02 06:32:46, mattn wrote: > > I don't think why I should add completion ...
13 years, 10 months ago (2011-06-02 06:39:53 UTC) #25
mattn
On 2011/06/02 06:39:53, brainman wrote: > On 2011/06/02 06:32:46, mattn wrote: > > > > ...
13 years, 10 months ago (2011-06-02 06:59:04 UTC) #26
brainman
On 2011/06/02 06:59:04, mattn wrote: > BTW, in future, if someone want to create cgo ...
13 years, 10 months ago (2011-06-02 07:11:03 UTC) #27
mattn
On 2011/06/02 07:11:03, brainman wrote: > On 2011/06/02 06:59:04, mattn wrote: > > > BTW, ...
13 years, 10 months ago (2011-06-02 08:47:01 UTC) #28
mattn
On 2011/06/02 08:47:01, mattn wrote: > On 2011/06/02 07:11:03, brainman wrote: > > On 2011/06/02 ...
13 years, 10 months ago (2011-06-02 08:55:30 UTC) #29
mattn
ChromeOS-Vanilla-...-VirtualBox.vdi is 872MB file. C:\>sendfile-stub.exe ChromeOS-Vanilla-0.13.576.2011_05_29_1658-r89cfbacc-VirtualBox.vdi 2011/06/02 18:03:48 Seed: 14.211402193206688 mb/s C:\>sendfile-transmitfile.exe ChromeOS-Vanilla-0.13.576.2011_05_29_1658-r89cfbacc-VirtualBox.vdi 2011/06/02 18:06:59 ...
13 years, 10 months ago (2011-06-02 09:10:41 UTC) #30
rsc
Thanks for working on this. http://codereview.appspot.com/4536076/diff/12003/src/pkg/net/sendfile_windows.go File src/pkg/net/sendfile_windows.go (right): http://codereview.appspot.com/4536076/diff/12003/src/pkg/net/sendfile_windows.go#newcode34 src/pkg/net/sendfile_windows.go:34: if errno != 0 ...
13 years, 10 months ago (2011-06-02 15:49:02 UTC) #31
mattn
http://codereview.appspot.com/4536076/diff/12003/src/pkg/net/sendfile_windows.go File src/pkg/net/sendfile_windows.go (right): http://codereview.appspot.com/4536076/diff/12003/src/pkg/net/sendfile_windows.go#newcode34 src/pkg/net/sendfile_windows.go:34: if errno != 0 { On 2011/06/02 15:49:02, rsc ...
13 years, 10 months ago (2011-06-03 00:14:07 UTC) #32
brainman
Thank you for doing this. Alex http://codereview.appspot.com/4536076/diff/21006/src/pkg/net/sendfile_windows.go File src/pkg/net/sendfile_windows.go (right): http://codereview.appspot.com/4536076/diff/21006/src/pkg/net/sendfile_windows.go#newcode5 src/pkg/net/sendfile_windows.go:5: package net It ...
13 years, 10 months ago (2011-06-03 07:31:57 UTC) #33
mattn
http://codereview.appspot.com/4536076/diff/21006/src/pkg/net/sendfile_windows.go File src/pkg/net/sendfile_windows.go (right): http://codereview.appspot.com/4536076/diff/21006/src/pkg/net/sendfile_windows.go#newcode5 src/pkg/net/sendfile_windows.go:5: package net On 2011/06/03 07:31:57, brainman wrote: > It ...
13 years, 10 months ago (2011-06-03 11:13:49 UTC) #34
brainman
On 2011/06/03 11:13:49, mattn wrote: > http://codereview.appspot.com/4536076/diff/21006/src/pkg/net/sendfile_windows.go > File src/pkg/net/sendfile_windows.go (right): > > http://codereview.appspot.com/4536076/diff/21006/src/pkg/net/sendfile_windows.go#newcode5 > ...
13 years, 10 months ago (2011-06-06 06:52:22 UTC) #35
peterGo
mattn, On 2011/06/03 11:13:49, mattn wrote: > Hmm, it can't send large file than 0xffffffff. ...
13 years, 10 months ago (2011-06-06 13:04:34 UTC) #36
brainman
http://codereview.appspot.com/4536076/diff/21006/src/pkg/net/sendfile_windows.go File src/pkg/net/sendfile_windows.go (right): http://codereview.appspot.com/4536076/diff/21006/src/pkg/net/sendfile_windows.go#newcode40 src/pkg/net/sendfile_windows.go:40: rv, errno := syscall.WaitForSingleObject(o.o.HEvent, syscall.INFINITE) I've said it before. ...
13 years, 10 months ago (2011-06-07 00:30:25 UTC) #37
mattn
ok, I uploaded code. http://codereview.appspot.com/4536076/diff/21006/src/pkg/net/sendfile_windows.go File src/pkg/net/sendfile_windows.go (right): http://codereview.appspot.com/4536076/diff/21006/src/pkg/net/sendfile_windows.go#newcode40 src/pkg/net/sendfile_windows.go:40: rv, errno := syscall.WaitForSingleObject(o.o.HEvent, syscall.INFINITE) ...
13 years, 10 months ago (2011-06-07 01:21:00 UTC) #38
brainman
http://codereview.appspot.com/4536076/diff/15009/src/pkg/net/sendfile_windows.go File src/pkg/net/sendfile_windows.go (right): http://codereview.appspot.com/4536076/diff/15009/src/pkg/net/sendfile_windows.go#newcode62 src/pkg/net/sendfile_windows.go:62: return int64(done), err, done > 0 Did you test ...
13 years, 10 months ago (2011-06-07 01:47:12 UTC) #39
mattn
http://codereview.appspot.com/4536076/diff/15009/src/pkg/net/sendfile_windows.go File src/pkg/net/sendfile_windows.go (right): http://codereview.appspot.com/4536076/diff/15009/src/pkg/net/sendfile_windows.go#newcode62 src/pkg/net/sendfile_windows.go:62: return int64(done), err, done > 0 > Did you ...
13 years, 10 months ago (2011-06-07 01:50:50 UTC) #40
brainman
On 2011/06/07 01:50:50, mattn wrote: > > Ok, I'll update the code. > I'm not ...
13 years, 10 months ago (2011-06-07 02:02:43 UTC) #41
mattn
At the first, sorry my poor grasp and long discuss. I've just understood that TransmitFile ...
13 years, 10 months ago (2011-06-07 05:38:05 UTC) #42
brainman
LGTM. Thank you. http://codereview.appspot.com/4536076/diff/15025/src/pkg/net/sendfile_windows.go File src/pkg/net/sendfile_windows.go (right): http://codereview.appspot.com/4536076/diff/15025/src/pkg/net/sendfile_windows.go#newcode60 src/pkg/net/sendfile_windows.go:60: done, err := iosrv.ExecIO(&o, 0) Sorry ...
13 years, 10 months ago (2011-06-07 06:17:54 UTC) #43
mattn
http://codereview.appspot.com/4536076/diff/15025/src/pkg/net/sendfile_windows.go File src/pkg/net/sendfile_windows.go (right): http://codereview.appspot.com/4536076/diff/15025/src/pkg/net/sendfile_windows.go#newcode60 src/pkg/net/sendfile_windows.go:60: done, err := iosrv.ExecIO(&o, 0) On 2011/06/07 06:17:54, brainman ...
13 years, 10 months ago (2011-06-07 06:27:25 UTC) #44
mattn
Hello bsiegert@gmail.com, bradfitz@golang.org, alex.brainman@gmail.com, rsc@golang.org, go.peter.90@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 10 months ago (2011-06-07 06:29:17 UTC) #45
mattn
On 2011/06/07 06:29:17, mattn wrote: > Hello mailto:bsiegert@gmail.com, mailto:bradfitz@golang.org, mailto:alex.brainman@gmail.com, > mailto:rsc@golang.org, mailto:go.peter.90@gmail.com (cc: mailto:golang-dev@googlegroups.com), ...
13 years, 9 months ago (2011-06-10 01:54:49 UTC) #46
bradfitz
I'm assuming you're pinging brainman? I trust he understands this iosrv.ExecIO stuff, because I don't. ...
13 years, 9 months ago (2011-06-10 17:08:57 UTC) #47
brainman
On 2011/06/10 17:08:57, bradfitz wrote: > > I trust he understands this iosrv.ExecIO stuff, because ...
13 years, 9 months ago (2011-06-11 00:44:03 UTC) #48
bradfitz
If you're happy, submit away. On Jun 10, 2011 5:44 PM, <alex.brainman@gmail.com> wrote: > On ...
13 years, 9 months ago (2011-06-11 01:58:51 UTC) #49
brainman
13 years, 9 months ago (2011-06-11 03:24:59 UTC) #50
*** Submitted as http://code.google.com/p/go/source/detail?r=599657138e00 ***

net: Sendfile for win32.
implement using TransmitFile().

R=bsiegert, bradfitz, alex.brainman, rsc, go.peter.90
CC=golang-dev
http://codereview.appspot.com/4536076

Committer: Alex Brainman <alex.brainman@gmail.com>
Sign in to reply to this message.

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