linux-2.6.3_time-interpolator-fix_A0
PATCH 1/1 linux-2.6.3_time-interpolator-fix_A0
Quoted 9 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · john stultz
John> Am I just missing something here?
I don't think so. Good bug hunting. Some time ago SGI reported some jumpiness but I never got a definite answer whether the problem had been solved.
You may want to run this by someone who actually understands the code in
timer.cbut I'm pretty sure you're right.
Sounds good, here is the patch then.
Any further feed back would be appreciated.
thanks
-john
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.
Please consider for inclusion into your tree.
kernel/timer.c +0 -1
@@ -677,7 +677,6 @@if (xtime.tv_nsec >=1000000000 ) { xtime.tv_nsec -=1000000000 ; xtime.tv_sec++; -time_interpolator_update (NSEC_PER_SEC );second_overflow (); } }