[email protected] wrote:
Fri Mar 20 00:13:47 PDT 2009 Manuel M T Chakravarty <[email protected]>
* Implement setThreadAffinity for Mac OS X (from 10.5)
I see the thread affinity API on OS X, while certainly a lot better than
the Linux one, is still not exactly what we want. From
http://developer.apple.com/ReleaseNotes/Performance/RN-AffinityAPI/index.html
For example, an application wanting to run 2 threads on separate L2
caches would set the threads with different affinity tags. On a dual core
machine, this affinity will effectively be ignored. However, on a 4-core
MacPro, the scheduler will try to run threads on separate packages.
Similarly, on an 8-core MacPro, the scheduler will try to run these
threads on separate dies (which may or may not be in the same physical
CPU package).
it is really "L2 cache affinity" rather than "core affinity". When we put
threads in different affinity sets, we want those threads to run on
separate cores, but we'd be more than happy for them to share an L2 cache
if possible. The desciption above seems to suggest that OS X will prefer
to move the threads onto separate L2 caches.
Of course when the number of threads equals the number of CPUs there's no
difference.
Cheers,
Simon
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc