lkml.org 
[lkml]   [2004]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm3-V0.7.32-15
Date
The code does not quite match either pattern but is perhaps
more like your second example.

For reference, the cpu_delay loop looks like this...

t1 = mygettime();
for(u=0;u<(loops/1000);u++) {
t0 = t1;
if (do_a_trace) {
gettimeofday(0, (struct timezone*)1);
}
for (v=0;v<1000;v++)
k+=1;
t1 = mygettime();
if ((t1-t0)>max_delay){
delay++;
if (do_a_trace) {
gettimeofday(0,0);
do_a_trace = 0;
printf("Trace triggered with %f second delay.\n",t1-t0);
}
}
}

I was trying to avoid the extra "rdtsc" overhead (plus the
floating point calculations) so - yes, I could have cases
where the time I measure is not caught by the kernel tracer.

[do some tests...]
Now I'm 5 for 5 with the revised code. Odd that all the numbers
are within about 2 or 3 usec (application measured / kernel measured).
If it was as bad as I was measuring it, I would have expected
one or two to be really off.

--Mark

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.061 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site