summaryrefslogtreecommitdiff
path: root/src/run.bash
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2013-06-12 18:46:35 +0400
committerDmitriy Vyukov <dvyukov@google.com>2013-06-12 18:46:35 +0400
commite37104fbffc2c74fffa76bdabd38462c7bc60786 (patch)
treeb07c40e6c06a440003cd400248f97e403ca5c96d /src/run.bash
parent8dd3aeff9f32324a25808b3a7ea3cdc6fe401f6d (diff)
downloadgo-e37104fbffc2c74fffa76bdabd38462c7bc60786.tar.gz
runtime: fix scheduler race condition
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://codereview.appspot.com/10051045
Diffstat (limited to 'src/run.bash')
0 files changed, 0 insertions, 0 deletions