]> Cypherpunks repositories - gostls13.git/commit
runtime: do not do futile netpolls
authorDmitry Vyukov <dvyukov@google.com>
Wed, 11 Feb 2015 16:11:32 +0000 (19:11 +0300)
committerDmitry Vyukov <dvyukov@google.com>
Thu, 26 Feb 2015 11:03:07 +0000 (11:03 +0000)
commitf47e581e022a29669d4dd6b62f8bf7d45c8395e5
tree0a2bbe2a95633ec0cbc0ccf49b583301e680ce41
parent3c8a89daf3a05a1dd98075a733db7a20bef2dc5c
runtime: do not do futile netpolls

There is no sense in trying to netpoll while there is
already a thread blocked in netpoll. And in most cases
there must be a thread blocked in netpoll, because
the first otherwise idle thread does blocking netpoll.

On some program I see that netpoll called from findrunnable
consumes 3% of time.

Change-Id: I0af1a73d637bffd9770ea50cb9278839716e8816
Reviewed-on: https://go-review.googlesource.com/4553
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
src/runtime/proc1.go