File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -3387,12 +3387,8 @@ top:
33873387 // blocked thread (e.g. it has already returned from netpoll, but does
33883388 // not set lastpoll yet), this thread will do blocking netpoll below
33893389 // anyway.
3390- // We only poll from one thread at a time to avoid kernel contention
3391- // on machines with many cores.
3392- if netpollinited () && netpollAnyWaiters () && sched .lastpoll .Load () != 0 && sched .pollingNet .Swap (1 ) == 0 {
3393- list , delta := netpoll (0 )
3394- sched .pollingNet .Store (0 )
3395- if ! list .empty () { // non-blocking
3390+ if netpollinited () && netpollAnyWaiters () && sched .lastpoll .Load () != 0 {
3391+ if list , delta := netpoll (0 ); ! list .empty () { // non-blocking
33963392 gp := list .pop ()
33973393 injectglist (& list )
33983394 netpollAdjustWaiters (delta )
Original file line number Diff line number Diff line change @@ -756,10 +756,9 @@ type p struct {
756756}
757757
758758type schedt struct {
759- goidgen atomic.Uint64
760- lastpoll atomic.Int64 // time of last network poll, 0 if currently polling
761- pollUntil atomic.Int64 // time to which current poll is sleeping
762- pollingNet atomic.Int32 // 1 if some P doing non-blocking network poll
759+ goidgen atomic.Uint64
760+ lastpoll atomic.Int64 // time of last network poll, 0 if currently polling
761+ pollUntil atomic.Int64 // time to which current poll is sleeping
763762
764763 lock mutex
765764
You can’t perform that action at this time.
0 commit comments