diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-03-18 15:47:19 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-03-18 15:47:19 +0000 |
commit | 31caec794c3978d55d79f715f21fb72948c9f300 (patch) | |
tree | 475474eb40efe84d3696177054dea9867c0f9261 /rts/Schedule.c | |
parent | 7583384214ed6aa4a90d77c5975728a9b06149f2 (diff) | |
download | haskell-31caec794c3978d55d79f715f21fb72948c9f300.tar.gz |
Set thread affinity with +RTS -qa (only on Linux so far)
Diffstat (limited to 'rts/Schedule.c')
-rw-r--r-- | rts/Schedule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c index 666b59e3e3..636b5179ad 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -2125,6 +2125,10 @@ workerStart(Task *task) cap = task->cap; RELEASE_LOCK(&task->lock); + if (RtsFlags.ParFlags.setAffinity) { + setThreadAffinity(cap->no, n_capabilities); + } + // set the thread-local pointer to the Task: taskEnter(task); |