Ian,
>> You will see only a small difference for 2-processor machines, but
>> on 4 and 8 processor machines, the new threaded code can more than
>> double your performance (assuming you aren't on a loser OS like
>> MacOS X or FreeBSD, that don't posses processor affinity).
>
>
http://developer.apple.com/releasenotes/Performance/RN-AffinityAPI/Thanks for the link! I asked my contacts at apple about this, and was told
you guys do not support affinity, so it is a relief to see you guys doing
something here.
Do you have a link to more documentation? I'm finding this page a little
sparse on usage details.
I did some digging, and found that I can translate a pthread_t into a thread_t
using the pthread_mach_thread_np interface. However, since pthreads start
executing when the pthread_create function is called, I guess I have to
start them up, and then change their affinity after they have started running
(the page suggests you start the thread, and then change their affinity before
they start running, and I don't see how this can be done in pthreads). This
will blunt a lot of the advantage to affinity.
The docs I found suggest that you should not use thread_t threads directly, so
how are you supposed to start the thread up w/o starting it running?
I don't suppose you have/are considering supporting something like linux has,
where you can modify the thread attribute using pthread_attr_setaffinity_np?
Can you supply some example code of using affinity with pthreads? The page
has no example calls, and no mention of what values the thread affinity tag
can take, and what that would mean if they had a given value.
I notice that does not provide processor affinity, but rather something it
describes as L2 affinity. I take this to mean that a thread will therefore
be allowed to migrate between processors that share a cache. Our timings
indicate you will lose a lot of the performance gain if this case. Do you
presently have any way, or plans to add support for, true processor affinity?
Why did you not add processor affinity when you mucked about with this
L2 affinity?
Thanks,
Clint
**************************************************************************
** R. Clint Whaley, PhD ** Assist Prof, UTSA ** www.cs.utsa.edu/~whaley **
**************************************************************************
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/_______________________________________________
Math-atlas-devel mailing list
Math-atlas-devel@...
https://lists.sourceforge.net/lists/listinfo/math-atlas-devel