[lkml]   [1998]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH] 2.0.34: new time.c code

Well, Scott having released his 2.1.10x code for "public consumption", here is a
2.0.34 version of the new time.c. Here is a summary of the new features:

- Gettimeofday() is now twice as fast. Takes on average 420 ns on my Cyrix
6x86MX 166MHz chip, whereas the original code took > 1 us. This provides a neat
boost for code that calls gettimeofday() very often. Note that on very fast
machines one may now get non-unique timestamps. This may or may not be a
problem, testing needed.
- Is not affected by TSC stopping/slowing down. Works on all CPUs without need
of a workaround. Works with APM.

- drift and jitter-free calibration of the TSC (the joystick driver, for one,
could use this calibration data).

- The code is shorter and more elegant than the present implementation.

- Shows CPU MHz at boot time. Precision is better than 0.01%.

- Allows for a very simple implementation of NTP time adjustments. Colin Plumb
is working on code for that. Note that the new code does _not_ break or affect
in any way the present NTP code. It will just make it easier for future NTP

- Extremely robust. I have been testing it for 45 days now without any problems.

The 2.0.34 version differs very slightly from the 2.1.10x implementation in the
way the TSC is calibrated, in order to get > 5x better precision.
Note that neither the 2.0.34 version nor the 2.1.10x version have been tested
on SMP machines. Could somebody with an SMP box test this, please?

Andrew D. Balsa

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:43    [from the cache]
©2003-2011 Jasper Spaans