• Dmitriy Vyukov's avatar
    runtime: fix scheduler race condition · dbcfed93
    Dmitriy Vyukov authored
    In starttheworld() we assume that P's with local work
    are situated in the beginning of idle P list.
    However, once we start the first M, it can execute all local G's
    and steal G's from other P's.
    That breaks the assumption above. Thus starttheworld() will fail
    to start some P's with local work.
    It seems that it can not lead to very bad things, but still
    it's wrong and breaks other assumtions
    (e.g. we can have a spinning M with local work).
    The fix is to collect all P's with local work first,
    and only then start them.
    
    R=golang-dev, rsc
    CC=golang-dev
    https://golang.org/cl/10051045
    dbcfed93
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...