swh:1:snp:77163734605b0ec556b01d897b7bb4a7e30d46b6
Revision 0a45d4491d0f172e02126370f312405c5d473363 authored by Paul Mackerras on 15 March 2006, 02:47:15 UTC, committed by Paul Mackerras on 16 March 2006, 05:54:55 UTC
The recent changes to keep gettimeofday in sync with xtime had the side
effect that it was occasionally possible for the time reported by
gettimeofday to go back by a microsecond.  There were two reasons:
(1) when we recalculated the offsets used by gettimeofday every 2^31
timebase ticks, we lost an accumulated fractional microsecond, and
(2) because the update is done some time after the notional start of
jiffy, if ntp is slowing the clock, it is possible to see time go backwards
when the timebase factor gets reduced.

This fixes it by (a) slowing the gettimeofday clock by about 1us in
2^31 timebase ticks (a factor of less than 1 in 3.7 million), and (b)
adjusting the timebase offsets in the rare case that the gettimeofday
result could possibly go backwards (i.e. when ntp is slowing the clock
and the timer interrupt is late).  In this case the adjustment will
reduce to zero eventually because of (a).

Signed-off-by: Paul Mackerras <paulus@samba.org>
1 parent 82dfdca
History
Tip revision: a4412fdd49dc011bcc2c0d81ac4cab7457092650 authored by Steven Rostedt (Google) on 21 November 2022, 15:44:03 UTC
error-injection: Add prompt for function error injection
Tip revision: a4412fd
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 424 bytes
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 87.5 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 66.2 KB
Makefile -rw-r--r-- 43.8 KB
README -rw-r--r-- 15.1 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top