LTP - gettimeofday02 FAIL
I've been getting a somewhat random error in a few of the recent 2.5 kernels with SMP machines. I noticed this on a 2.5.47 bk pull, but I was also able to reproduce it on 2.5.46. I haven't tried any earlier kernels yet. The LTP gettimeofday02 test sometimes fails with this message:
gettimeofday02 0 INFO : checking if gettimeofday is monotonous,
takes 30s
gettimeofday02 1 FAIL : Time is going backwards (old
1037138184.846333 vs new 1037138184.843346!
I have not been able to reproduce this on a single processor machine though.
Basically, all the test does is:gettimeofday(&tv1, NULL);
while(!done) {
gettimeofday(&tv2, NULL);
FAIL if tv2 < tv1
tv1 = tv2;
}Any ideas on what could be causing this?
Thanks,
Paul Larson
On Tue, Nov 12, 2002 at 04:11:14PM -0600, Paul Larson wrote:
I have not been able to reproduce this on a single processor machine
though.
Basically, all the test does is:
gettimeofday(&tv1, NULL);
while(!done) {
gettimeofday(&tv2, NULL);
FAIL if tv2 < tv1
tv1 = tv2;
}
Any ideas on what could be causing this?The TSC's aren't synchronized between CPUs.
This is becoming more and more of a problem and in-escapable on some hardware so I'm starting to wonder if assuming the TSCs are even roughly synchronized *anywhere* is a good idea.
--cw
Quoted 5 lines · Chris Wedgwood
The TSC's aren't synchronized between CPUs.
This is becoming more and more of a problem and in-escapable on some hardware so I'm starting to wonder if assuming the TSCs are even roughly synchronized *anywhere* is a good idea.
So this is a hardware issue? no way around this?
-Paul Larson
Quoted 1 line · Paul Larson
So this is a hardware issue? no way around this?
For some people it is a hardware issue. The way around is not not use the TSC for certain things.
--cw