On Sun, Nov 06, 2005 at 11:02:29AM -0800, Mark Mitchell wrote:
> Are you saying that you don't expect there to ever be an architecture
> that might have three or more ways of doing locking?  That seems rather
> optimistic to me.  I think we ought to plan for needing as many versions
> as we have CPUs, roughly speaking.

I think this is overkill.

> If we currently use the same sequences for all i486 and higher processors,
> then that's a fine idea;

This is pretty much true.

To keep all this in perspective, folks should remember that atomic
operations are *slow*.  Very very slow.  Orders of magnitude slower
than function calls.  Seriously.  Taking p4 as the extreme example,
one can expect a null function call in around 10 cycles, but a locked
memory operation to take 1000.  Usually things aren't that bad, but
I believe some poor design decisions were made for p4 here.  But even
on a platform without such problems you can expect a factor of 30
difference.


r~

Reply via email to