1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:54:40 -07:00
go/src
Austin Clements 11eaf42886 runtime: reduce Windows timer resolution when idle
Currently Go sets the system-wide timer resolution to 1ms the whole
time it's running. This has negative affects on system performance and
power consumption. Unfortunately, simply reducing the timer resolution
to the default 15ms interferes with several sleeps in the runtime
itself, including sysmon's ability to interrupt goroutines.

This commit takes a hybrid approach: it only reduces the timer
resolution when the Go process is entirely idle. When the process is
idle, nothing needs a high resolution timer. When the process is
non-idle, it's already consuming CPU so it doesn't really matter if
the OS also takes timer interrupts more frequently.

Updates #8687.

Change-Id: I0652564b4a36d61a80e045040094a39c19da3b06
Reviewed-on: https://go-review.googlesource.com/38403
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
2017-04-29 04:15:49 +00:00
..
archive os: do not report ModeDir for symlinks on windows 2017-04-26 23:17:23 +00:00
bufio bufio: clarify that Flush returns a cached write error 2017-04-21 00:48:51 +00:00
builtin
bytes bytes: clarify documentation for UnreadByte/Rune 2017-04-28 16:37:13 +00:00
cmd cmd/compile/internal/ssa: more constant folding rules for ARM 2017-04-29 02:53:46 +00:00
compress compress/lzw: fix hi code overflow. 2017-04-28 05:59:30 +00:00
container
context context: define behavior for Err before Done is closed 2017-04-26 15:39:18 +00:00
crypto crypto/sha256,crypto/sha512: improve performance for sha{256,512}.block on ppc64le 2017-04-26 12:34:03 +00:00
database/sql database/sql: ensure releaseConn is defined before a possible close 2017-04-28 22:55:26 +00:00
debug debug/pe: add TestBuildingWindowsGUI 2017-03-30 01:19:57 +00:00
encoding encoding/json: replace encoderCache RWMutex with a sync.Map 2017-04-28 20:19:10 +00:00
errors
expvar expvar: replace RWMutex usage with sync.Map and atomics 2017-04-28 21:59:55 +00:00
flag
fmt
go go/internal/gcimporter: add test object files for go1.8 versions 4 and 5 2017-04-25 18:15:20 +00:00
hash hash/crc32: optimize arm64 crc32 implementation 2017-04-13 12:44:10 +00:00
html html/template: use bytes.ContainsAny 2017-04-25 23:36:25 +00:00
image image/jpeg: fix extended sequential Huffman table selector (Th). 2017-04-27 03:48:40 +00:00
index/suffixarray
internal os, net, internal/poll: return consistent error for closed socket 2017-04-26 00:03:14 +00:00
io io: correctly compute call depth in test 2017-04-18 19:56:54 +00:00
log
math math/big: improve performance for addVV/subVV for ppc64x 2017-04-25 13:15:39 +00:00
mime mime: re-accept empty encoded-text 2017-04-29 04:14:36 +00:00
net net/rpc: use a sync.Map for serviceMap instead of RWMutex 2017-04-28 20:42:11 +00:00
os os/exec: document that non-comparable writers may race 2017-04-28 17:57:01 +00:00
path os: do not report ModeDir for symlinks on windows 2017-04-26 23:17:23 +00:00
plugin plugin: resolve plugin import path issue 2017-04-26 00:54:54 +00:00
reflect reflect: use sync.Map instead of RWMutex for type caches 2017-04-27 15:34:41 +00:00
regexp regexp: speed up QuoteMeta with a lookup table 2017-04-28 06:43:14 +00:00
runtime runtime: reduce Windows timer resolution when idle 2017-04-29 04:15:49 +00:00
sort
strconv
strings strings: optimize Count for amd64 2017-04-07 14:25:13 +00:00
sync sync: import Map from x/sync/syncmap 2017-04-26 18:05:06 +00:00
syscall syscall: fix typo in documentation for StringToUTF16Ptr 2017-04-28 05:28:27 +00:00
testing testing: add argument to list tests, benchmarks, and examples 2017-04-26 15:53:32 +00:00
text all: remove some unused parameters in test code 2017-04-25 14:38:10 +00:00
time all: remove some unused parameters in test code 2017-04-25 14:38:10 +00:00
unicode
unsafe
vendor/golang_org/x vendor: update vendored route 2017-04-25 21:39:45 +00:00
all.bash Revert "build: fail nicely if somebody runs all.bash from a binary tarball package" 2017-04-28 21:19:32 +00:00
all.bat
all.rc
androidtest.bash
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
iostest.bash
make.bash
make.bat
Make.dist
make.rc
naclmake.bash
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc