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

Issue 4538088: code review 4538088: http,io,net: sendfile support (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 10 months ago by bradfitz
Modified:
13 years, 10 months ago
Reviewers:
r, rsc, iant, r2
CC:
golang-dev
Visibility:
Public.

Description

http,io,net: sendfile support v2 using ReaderFrom / ReaderNFrom

Patch Set 1 #

Patch Set 2 : diff -r 58102fac10c6 https://go.googlecode.com/hg #

Patch Set 3 : diff -r 58102fac10c6 https://go.googlecode.com/hg #

Total comments: 8

Patch Set 4 : diff -r 58102fac10c6 https://go.googlecode.com/hg #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -14 lines) Patch
M src/pkg/http/server.go View 1 1 chunk +20 lines, -0 lines 0 comments Download
M src/pkg/io/io.go View 1 3 chunks +22 lines, -3 lines 3 comments Download
M src/pkg/net/Makefile View 1 3 chunks +18 lines, -11 lines 0 comments Download
A src/pkg/net/sendfile_linux.go View 1 2 3 1 chunk +87 lines, -0 lines 0 comments Download
A src/pkg/net/sendfile_stub.go View 1 2 3 1 chunk +18 lines, -0 lines 3 comments Download

Messages

Total messages: 14
bradfitz
Hello rsc@golang.org, iant@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg
13 years, 10 months ago (2011-05-23 23:45:17 UTC) #1
r2
I dislike the precedent this sets. Sendfile is a disgusting API and we're propagating through ...
13 years, 10 months ago (2011-05-24 00:23:51 UTC) #2
bradfitz
A systems programming language but we can't get too close to the system if it ...
13 years, 10 months ago (2011-05-24 00:34:39 UTC) #3
bradfitz
Rob, Ignoring the io pkg changes, what are your thoughts on just the net pkg ...
13 years, 10 months ago (2011-05-24 00:38:36 UTC) #4
r2
On Tue, May 24, 2011 at 10:34 AM, Brad Fitzpatrick <bradfitz@golang.org> wrote: > A systems ...
13 years, 10 months ago (2011-05-24 00:39:10 UTC) #5
r
http://codereview.appspot.com/4538088/diff/5001/src/pkg/net/sendfile_linux.go File src/pkg/net/sendfile_linux.go (right): http://codereview.appspot.com/4538088/diff/5001/src/pkg/net/sendfile_linux.go#newcode17 src/pkg/net/sendfile_linux.go:17: // SendFile sends f to c using sendfile(2), bypassing ...
13 years, 10 months ago (2011-05-24 00:44:37 UTC) #6
r2
Why does sendfile_stub.go not implement Sendfile? I would expect the design to be to add ...
13 years, 10 months ago (2011-05-24 00:46:09 UTC) #7
bradfitz
On Mon, May 23, 2011 at 5:45 PM, Rob 'Commander' Pike <r@google.com> wrote: > Why ...
13 years, 10 months ago (2011-05-24 00:50:25 UTC) #8
bradfitz
http://codereview.appspot.com/4538088/diff/5001/src/pkg/net/sendfile_linux.go File src/pkg/net/sendfile_linux.go (right): http://codereview.appspot.com/4538088/diff/5001/src/pkg/net/sendfile_linux.go#newcode17 src/pkg/net/sendfile_linux.go:17: // SendFile sends f to c using sendfile(2), bypassing ...
13 years, 10 months ago (2011-05-24 00:57:23 UTC) #9
bradfitz
Hello rsc@golang.org, iant@golang.org, r@google.com, r@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 10 months ago (2011-05-24 00:57:33 UTC) #10
r
http://codereview.appspot.com/4538088/diff/9002/src/pkg/io/io.go File src/pkg/io/io.go (right): http://codereview.appspot.com/4538088/diff/9002/src/pkg/io/io.go#newcode223 src/pkg/io/io.go:223: // the copy is implemented by calling dst.ReadFrom(src). or ...
13 years, 10 months ago (2011-05-24 03:00:29 UTC) #11
rsc
I'd still like to find a way that involves touching less code. Another possibility is ...
13 years, 10 months ago (2011-05-24 03:12:53 UTC) #12
bradfitz
On Mon, May 23, 2011 at 8:12 PM, Russ Cox <rsc@golang.org> wrote: > I'd still ...
13 years, 10 months ago (2011-05-24 04:52:10 UTC) #13
rsc
13 years, 10 months ago (2011-05-24 17:44:12 UTC) #14
On Mon, May 23, 2011 at 20:34, Brad Fitzpatrick <bradfitz@golang.org> wrote:
> A systems programming language but we can't get too close to the system if
> it gets ugly?

For what it's worth, I don't think anyone said that.

What is important is that the ugliness of the underlying
system is not allowed to show through.  The details of
the ugliness tend to change; baking them into your
APIs is a recipe for being out of date (and ugly on top of that).
Consider how the net package hides the ugliness of both
non-blocking I/O and sockets.  If Linux comes out with
eeepoll, we won't have to change any visible Go APIs.
If someone adds a new socket address type, net.Dial
doesn't change.

> Sendfile fwiw is real & makes a difference.

Sure, but it's okay to omit until we have a clean way
to do it (as we have omitted it until now).  We're usually
willing to sacrifice some performance or even functionality
now in order to preserve the ability to do it right later.

Russ
Sign in to reply to this message.

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