]> git.hungrycats.org Git - linux/commit
[PATCH] time interpolator fix
authorAndrew Morton <akpm@osdl.org>
Fri, 12 Mar 2004 00:12:38 +0000 (16:12 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 12 Mar 2004 00:12:38 +0000 (16:12 -0800)
commit40aaa9b3f87d0d58387af5c415ebb10406f5ad29
tree0da7a9f1ab1752514300e8411ced4d41c6f4961c
parent688466a4f24ed48874c221b80a910f61cee0fd3e
[PATCH] time interpolator fix

From: john stultz <johnstul@us.ibm.com>

In developing the ia64-cyclone patch, which implements a cyclone based time
interpolator, I found the following bug which could cause time
inconsistencies.

In update_wall_time_one_tick(), which is called each timer interrupt, we
call time_interpolator_update(delta_nsec) where delta_nsec is approximately
NSEC_PER_SEC/HZ.  This directly correlates with the changes to xtime which
occurs in update_wall_time_one_tick().

However in update_wall_time(), on a second overflow, we again call
time_interpolator_update(NSEC_PER_SEC).  However while the components of
xtime are being changed, the overall value of xtime does not (nsec is
decremented NSEC_PER_SEC and sec is incremented).  Thus this call to
time_interpolator_update is incorrect.

This patch removes the incorrect call to time_interpolator_update and was
found to resolve the time inconsistencies I had seen while developing the
ia64-cyclone patch.
kernel/timer.c