On the new dual-core systems, is there any way to tell which
threads are running on which physical CPUs? I was wondering if it's
possible to get better performance by restricting memory bus access
(as each pair of cores shares a single bus).
Right now, we don't have thread affinity, so any such information
would be immediately stale. That is, even if you were able to get
your threads started off on all the right processors they wouldn't
stay there. You can actually see this on a MP machine with a single
threaded app, using the Activity Monitor. It will migrate back and
forth among the processors over time.
As a general rule, it is almost always possible to get better
performance by restricting memory bus access, even on uniprocessor
machines. ;-)