[ofw][patch][WinVerbs tests] Re: fix IPv6 related connectionproblem

Leonid Keller leonid at mellanox.co.il
Thu Feb 19 01:11:43 PST 2009


> You can use the __rdtsc ...
We gave up this way.
 __rdtsc is complained on the Web to be unstable function, especially in
multi-processor environment.
If it is that simple why didn't Microsoft use it in
QueryPerformanceCounter implementation ? :(

Let's formulate our problem:
	We have to measure a very fast process and the time T of the
time stamping itself influence the results.

Possible solutions:
1. Exclude T from the result by some artificial trick. (as in the
discussed patch)
2. Measure T before the loop and subtract after.
3. Make stampings once in N loops decreasing N times it's influence.
4. ?

What would you prefere ?

> -----Original Message-----
> From: Fab Tillier [mailto:ftillier at windows.microsoft.com] 
> Sent: Thursday, February 19, 2009 3:55 AM
> To: Leonid Keller; Sean Hefty; ofw at lists.openfabrics.org
> Subject: RE: [ofw][patch][WinVerbs tests] Re: fix IPv6 
> related connectionproblem 
> 
> > The timestamp has been moved to after
> > post, because on Win2k8 it takes 1.1 us !!! And this is 
> what doubles 
> > the latency!
> 
> You can use the __rdtsc intrinsic, it has far lower overhead.
> 
> Depending on the system, QueryPerformanceCounter will go to 
> the system PM timer, which can involve a good amount of overhead.
> 
> > We placed it after post, where the test anyway does nothing...
> > BTW, the same test with timestamps on your favorite place 
> :) on win2k3 
> > takes 1.1 usec less, timestamping there takes several nanos.
> 
> Yes, probably a difference in the HAL that changes the timer source.
> 
> > Another solution would have been a proprietory function, 
> that performs 
> > timestamping on win2k8 fast.
> 
> #pragma intrinsic(__rdtsc)
> 
> start = __rdtsc();
> 
> 



More information about the ofw mailing list