Re: Whats the purpose of get_cycles_sync()

2007-10-31 Thread Joerg Roedel
Hi Vojtech, On Tue, Oct 30, 2007 at 11:02:09PM +0100, Vojtech Pavlik wrote: > The K8's still guarantee that subsequent RDTSCs return increasing > values, even if the processor reorders them. > > What could have been happening then was that the RDTSC instruction might > have been reordered by the

Re: Whats the purpose of get_cycles_sync()

2007-10-31 Thread Joerg Roedel
Hi Andi, On Tue, Oct 30, 2007 at 09:21:02PM +0100, Andi Kleen wrote: > "Joerg Roedel" <[EMAIL PROTECTED]> writes: > > > I would like to answer what the special purpose of the get_cycles_sync() > > function is in the x86 architecture. In special I ask myself why > > this function has to be *sync*?

Re: Whats the purpose of get_cycles_sync()

2007-10-30 Thread Andi Kleen
On Tue, Oct 30, 2007 at 11:02:09PM +0100, Vojtech Pavlik wrote: > > He can give details on the test. > > > > I suspect the reason was because the CPU reordered the RDTSCs so that > > a later RDTSC could return a value before an earlier one. This can > > happen because gettimeofday() is so fast tha

Re: Whats the purpose of get_cycles_sync()

2007-10-30 Thread Vojtech Pavlik
On Tue, Oct 30, 2007 at 09:21:02PM +0100, Andi Kleen wrote: > "Joerg Roedel" <[EMAIL PROTECTED]> writes: > > > I would like to answer what the special purpose of the get_cycles_sync() > > function is in the x86 architecture. In special I ask myself why > > this function has to be *sync*? > > Vojt

Re: Whats the purpose of get_cycles_sync()

2007-10-30 Thread Andi Kleen
"Joerg Roedel" <[EMAIL PROTECTED]> writes: > I would like to answer what the special purpose of the get_cycles_sync() > function is in the x86 architecture. In special I ask myself why > this function has to be *sync*? Vojtech had one test that tested time monotonicity over CPUs and it constantl