| commit | c65f74d339169a5597c64a0076c17905c85b37d8 | [log] [tgz] |
|---|---|---|
| author | Andy Pan <panjf2000@gmail.com> | Thu Oct 19 18:50:21 2023 +0800 |
| committer | Gopher Robot <gobot@golang.org> | Mon Oct 23 18:44:26 2023 +0000 |
| tree | a2af774421f9dd244ed93afceb9789b0fdceda53 | |
| parent | 255ed03a94c4c91840f16fe417a7ed5097a04862 [diff] |
net,internal/poll: mark it as handled even if sendfile(2) succeeded with 0 bytes sent
CL 415834 fixed #53658 and somehow it only fixed it on Linux,
sendfile can also succeed with 0 bytes sent on other platforms
according to their manuals, this CL will finish the work that
CL 415834 left out on other platforms.
goos: darwin
goarch: arm64
pkg: net
│ old │ new │
│ sec/op │ sec/op vs base │
SendfileZeroBytes-10 7.563µ ± 5% 7.184µ ± 6% -5.01% (p=0.009 n=10)
│ old │ new │
│ B/op │ B/op vs base │
SendfileZeroBytes-10 3562.5 ± 7% 590.0 ± 2% -83.44% (p=0.000 n=10)
│ old │ new │
│ allocs/op │ allocs/op vs base │
SendfileZeroBytes-10 0.00 ± 0% 11.00 ± 0% ? (p=0.000 n=10)
[1] https://man.freebsd.org/cgi/man.cgi?sendfile(2)
[2] https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/sendfile.2.html
[3] https://man.dragonflybsd.org/?command=sendfile§ion=2
[4] https://docs.oracle.com/cd/E88353_01/html/E37843/sendfile-3c.html
Change-Id: I55832487595ee8e0f44f367cf2a3a1d827ba590d
Reviewed-on: https://go-review.googlesource.com/c/go/+/536455
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.