diff options
Diffstat (limited to 'src/runtime/proc.go')
| -rw-r--r-- | src/runtime/proc.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go index 44c6d0b4e4..db7a5b2bb1 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -3387,12 +3387,8 @@ top: // blocked thread (e.g. it has already returned from netpoll, but does // not set lastpoll yet), this thread will do blocking netpoll below // anyway. - // We only poll from one thread at a time to avoid kernel contention - // on machines with many cores. - if netpollinited() && netpollAnyWaiters() && sched.lastpoll.Load() != 0 && sched.pollingNet.Swap(1) == 0 { - list, delta := netpoll(0) - sched.pollingNet.Store(0) - if !list.empty() { // non-blocking + if netpollinited() && netpollAnyWaiters() && sched.lastpoll.Load() != 0 { + if list, delta := netpoll(0); !list.empty() { // non-blocking gp := list.pop() injectglist(&list) netpollAdjustWaiters(delta) |
