aboutsummaryrefslogtreecommitdiff
path: root/src/strings
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-01-13 12:17:26 -0800
committerIan Lance Taylor <iant@golang.org>2020-01-14 19:54:20 +0000
commitcfe3cd903f018dec3cb5997d53b1744df4e53909 (patch)
treee685f5fa8ca0df1bd74b2c2a634a3b70dc276deb /src/strings
parent71154e061f067a668e7b619d7b3701470b8561be (diff)
downloadgo-cfe3cd903f018dec3cb5997d53b1744df4e53909.tar.xz
runtime: keep P's first timer when in new atomically accessed field
This reduces lock contention when only a few P's are running and checking for whether they need to run timers on the sleeping P's. Without this change the running P's would get lock contention while looking at the sleeping P's timers. With this change a single atomic load suffices to determine whether there are any ready timers. Change-Id: Ie843782bd56df49867a01ecf19c47498ec827452 Reviewed-on: https://go-review.googlesource.com/c/go/+/214185 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/strings')
0 files changed, 0 insertions, 0 deletions