diff options
| author | Carlos Amedee <carlos@golang.org> | 2025-04-30 15:17:45 -0400 |
|---|---|---|
| committer | Carlos Amedee <carlos@golang.org> | 2025-05-12 18:35:25 -0700 |
| commit | 1e436ba668f5988ca8fbeb68734800b9dcf33dbc (patch) | |
| tree | 256f21065c77b552a52d835bac211cafa26b9d9c /src/runtime/runtime2.go | |
| parent | 3474c52e4b082421aa948eb178279f6a879701e2 (diff) | |
| download | go-1e436ba668f5988ca8fbeb68734800b9dcf33dbc.tar.xz | |
runtime: only poll network from one P at a time in findRunnable
This change reintroduces CL 564197. It was reverted due to a failing
benchmark. That failure has been resolved.
For #65064
Change-Id: Ic88841d2bc24c2717ad324873f0f52699f21dc66
Reviewed-on: https://go-review.googlesource.com/c/go/+/669235
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/runtime2.go')
| -rw-r--r-- | src/runtime/runtime2.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index da6791f9d2..920437882d 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -760,9 +760,10 @@ type p struct { } type schedt struct { - goidgen atomic.Uint64 - lastpoll atomic.Int64 // time of last network poll, 0 if currently polling - pollUntil atomic.Int64 // time to which current poll is sleeping + goidgen atomic.Uint64 + lastpoll atomic.Int64 // time of last network poll, 0 if currently polling + pollUntil atomic.Int64 // time to which current poll is sleeping + pollingNet atomic.Int32 // 1 if some P doing non-blocking network poll lock mutex |
