Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/goPublic

Commitceeda72

Browse files
committed
[release-branch.go1.1] runtime: prevent sysmon from polling network excessivly
««« CL 11569043 / 6b3c351c7fe6runtime: prevent sysmon from polling network excessivlyIf the network is not polled for 10ms, sysmon starts polling networkon every iteration (every 20us) until another thread blocks in netpoll.Fixes issue 5922 .R=golang-dev, iantCC=golang-devhttps://golang.org/cl/11569043»»»Update#5928R=golang-dev, bradfitzCC=golang-devhttps://golang.org/cl/11438044
1 parentfc9a18f commitceeda72

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎src/pkg/runtime/proc.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,6 +2015,7 @@ sysmon(void)
20152015
lastpoll=runtime·atomicload64(&runtime·sched.lastpoll);
20162016
now=runtime·nanotime();
20172017
if(lastpoll!=0&&lastpoll+10*1000*1000>now) {
2018+
runtime·cas64(&runtime·sched.lastpoll,lastpoll,now);
20182019
gp=runtime·netpoll(false);// non-blocking
20192020
injectglist(gp);
20202021
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp