Subj : Re: What is the real costs of LOCK on x86 multiprocesor machine? To : comp.programming.threads From : Gianni Mariani Date : Sat Jul 30 2005 03:00 pm Mirek Fidler wrote: > I am unable to find anwswer to above question. Only tidbit of > information was that it is 100 cycles on P4, but perhaps that was just > the worst case. > > Measuring the same on my uniprocesor AMD64 machine, LOCKed instructin > seem to be 3 times slower than regular one, but I guess that has only a > little relevance on real MP machine. OH - and also, the cost of cpu-cpu communication through shared memory is somthing else you might want to consider. I wrote some code many moons ago that I posted on the net... http://groups-beta.google.com/group/comp.os.linux.development.system/msg/df42233b14e5f962?dmode=source&hl=en In general, I found that latentcies in absolute time stayed about the same until the AMD Opteron came out which shaved a few more cycles out of it. I don't have the data handy. .