time jumps forward/backwards

Ben Gamsa ben at somanetworks.com
Tue Sep 1 07:53:33 EST 2009


Our project is currently using 2.6.27.4 with a patch from Paul Mackerras 
("powerpc: Improve resolution of VDSO clock_gettime") running on a 
MPC8555.  We picked up the patch on the hope that it would fix an 
earlier problem we had with time jumping forwards and backwards shortly 
after boot-up.  It seemed to fix that problem, but it seems we have 
another, similar problem.

It appears to be the case that when the time on the system is around the 
epoch (1970), that time will occasionally jump forward and then backward 
by about 17592 seconds.  When it jumps forward, it always jumps back a 
few milliseconds later.  However, it's not always easy to catch these 
occurrences.  The delta is more specifically about 17592186059 usec, 
give or take a few 10s of microseconds (most of the time), despite the 
fact that the user-level program I have that is testing it only checks 
every 10 milliseconds.

The number seems suspiciously close to 2^44 nanoseconds, which suggests 
some sort of overflow error, perhaps caused by the time being set to 
around time 0.

I'm not really sure where to begin looking (I know that the time code is 
one of the more sensitive bits in the system so I definitely don't want 
to go blindly mucking around), so I was hoping to get some suggestions 
from the list.

Thanks for any help.

-- 
Ben Gamsa       ben at somanetworks.com
SOMA Networks   312 Adelaide St. W. Suite 600 Toronto, Ontario, M5V1R2


More information about the Linuxppc-dev mailing list