lkml.org 
[lkml]   [2003]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: gettimeofday running backwards on 2.4.20
Date
On Wed 23 Apr 03 01:23, Trammell Hudson wrote:
> [ Please cc hudson@osresearch.net on any replies. Thank you! ]
>
> A few months ago I noticed gettimeofday running backwards on
> dual Pentium II and dual Pentium Pro systems with 2.4.18. Based
> on postings made to linux-kernel in June of 2002, I upgraded
> to 2.4.20 and the problem seemed to go away:
>
> http://groups.google.com/groups?threadm=3D16DE83.3060409@tiscalinet.it
>
> Just recently my NAS benchmarks and MPI latency tests showed bizarre
> results, so I pulled out my test program and am seeing the same
> problems again. It seems that roughly 50 in 1 million calls go
> backwards, even with 2.4.20.

It's happening on my VAIO laptop as well, with a similar frequency. The size
of the typical regression dropped by roughly an order of magnitude between
2.4.19 and 2.4.20, from several 10's of ms to a few ms.

There needs to be a final idiot check in there, as the last thing that
happens in sys_gettimeofday, to catch and prevent such regressions in a
brutally stupid way, in addition to the fancy algorithm that tries to prevent
them, and has never fully succeeded in doing that.

A reasonable algorithm is: if time goes backwards by less than a second, it
wasn't somebody changing the clock, so return the previous timeofday,
otherwise, save the new value for the next test.

Applications like games (but not only games) can get pretty messed up by a
timeofday that jumps backwards every couple of seconds.

Regards,

Daniel
-
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 13:34    [W:0.042 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site