diff options
author | Simon Marlow <marlowsd@gmail.com> | 2010-10-13 18:43:00 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2010-10-13 18:43:00 +0000 |
commit | 676b26bb57906b7fccf813771909ee19366e81e2 (patch) | |
tree | ffa02f58ce25837fe6ca74d76e2a091ef77a68d7 /rts | |
parent | 47778c38eb4334de60dc3daaf0ab65a916b2043e (diff) | |
download | haskell-676b26bb57906b7fccf813771909ee19366e81e2.tar.gz |
comment
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Threads.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rts/Threads.c b/rts/Threads.c index 7344134a7d..0dee734baa 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -284,6 +284,19 @@ unblock: // we'll block again. tso->why_blocked = NotBlocked; appendToRunQueue(cap,tso); + + // We used to set the context switch flag here, which would + // trigger a context switch a short time in the future (at the end + // of the current nursery block). The idea is that we have just + // woken up a thread, so we may need to load-balance and migrate + // threads to other CPUs. On the other hand, setting the context + // switch flag here unfairly penalises the current thread by + // yielding its time slice too early. + // + // The synthetic benchmark nofib/smp/chan can be used to show the + // difference quite clearly. + + // cap->context_switch = 1; } /* ---------------------------------------------------------------------------- |