From 352dd2d932c1c1c6dbc3e112fcdfface07d4fffb Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 14 Feb 2024 17:54:00 -0800 Subject: runtime: only poll network from one P at a time in findRunnable For #65064 Change-Id: Ifecd7e332d2cf251750752743befeda4ed396f33 Reviewed-on: https://go-review.googlesource.com/c/go/+/564197 LUCI-TryBot-Result: Go LUCI Reviewed-by: Artur M. Wolff Reviewed-by: Carlos Amedee Reviewed-by: Mauri de Souza Meneguzzo Reviewed-by: Michael Pratt --- src/runtime/runtime2.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/runtime/runtime2.go') diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index e56b45053e..27d14b890b 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -757,9 +757,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 -- cgit v1.3