• Dmitriy Vyukov's avatar
    runtime: tune P retake logic · 179d41fe
    Dmitriy Vyukov authored
    When GOMAXPROCS>1 the last P in syscall is never retaken
    (because there are already idle P's -- npidle>0).
    This prevents sysmon thread from sleeping.
    On a darwin machine the program from issue 6673 constantly
    consumes ~0.2% CPU. With this change it stably consumes 0.0% CPU.
    Fixes #6673.
    
    R=golang-codereviews, r
    CC=bradfitz, golang-codereviews, iant, khr
    https://golang.org/cl/56990045
    179d41fe
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...